This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | NbBundleProcessor does not return errors consistently, causing "incorrect error badges" problem. | ||
---|---|---|---|
Product: | platform | Reporter: | Jan Lahoda <jlahoda> |
Component: | -- Other -- | Assignee: | Antonin Nebuzelsky <anebuzelsky> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | anebuzelsky, tzezula |
Priority: | P3 | ||
Version: | 7.0 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 192750 | ||
Attachments: | Test case. |
I will look at it. I can reproduce a problem in a unit test, which I think I know how to fix. Whether that will be helpful avoiding incorrect error badges in the editor is another question. I fixed the problem in the processor that you reported with core-main #7991917bbcbb and core-main #a020b6dd4102. You can see that it is consistently reporting an error in whatever source files it is given: if you clean the project and F9 on A.java and then F9 on B.java, B.java fails to compile; if you do the reverse, A.java fails to compile; if you F11, one or the other will fail to compile. This doesn't seem to fully fix the Java parser, though; weird sequences of changes can still confuse it temporarily. I'm not sure how relevant it is for actual errors to be displayed perfectly; much more important that non-erroneous sources are displayed without errors. Unfortunately that does not always seem to be the case, either - meaning inconsistent error reporting for duplicate keys was not the only issue. *** This bug has been marked as a duplicate of bug 196104 *** Integrated into 'main-golden', will be available in build *201103020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/7991917bbcbb User: Jesse Glick <jglick@netbeans.org> Log: #194958: make sure incremental compilation reports duplicate key errors. |
Created attachment 105556 [details] Test case. Product Version: NetBeans IDE Dev (Build 110130-7ae8dd573ee3) Java: 1.6.0_20; OpenJDK 64-Bit Server VM 19.0-b09 System: Linux version 2.6.35-24-generic running on amd64; UTF-8; en_US (nb) Userdir: /tmp/nbuser Steps to reproduce: 1. Download, open and unpack the attached project 2. Open it in the IDE: one of org.netbeans.test.nbbundle.messages.{A,B} will be marked with an error badge. Use Tasks window to check that the source of the compilation error is the @NbBundle.Messages/NbBundleProcessor. 3. Open the file marked with the error badge. No errors are reported in the given file. Aside this being wrong, this also causes an automated attempt to resolve the problem by recompiling the current source root. But the error badge is not cleared by this, as the error is again reported when both the files are compiled at once.