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.

Bug 182530 - More automatic incorrect error badge resolution
Summary: More automatic incorrect error badge resolution
Status: RESOLVED DUPLICATE of bug 193183
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks: 104665
  Show dependency tree
 
Reported: 2010-03-22 22:00 UTC by Jesse Glick
Modified: 2010-12-09 17:55 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2010-03-22 22:00:38 UTC
IncorrectErrorBadges has to run pretty frequently in my experience with larger projects, especially but not exclusively Maven. It usually works, but it takes some user effort to invoke it: you need to open the supposedly erroneous file. This is fine if there is just one source root affected, but I often find that after opening a group of related projects there are a number of bogus error badges. For example, today I opened sqe.kenai.com sources (which I believe I had not done since the last time I had to delete my Java index cache), and several modules were marked erroneous; to get the badges to go away, I had to open a badged source file from each.

Perhaps if IEB runs on one source root, and it succeeds in clearing its badges, and there are other open source roots which have error badges, it should immediately be run on these as well; in most cases they will also be found to be correct. This would save the user the trouble of instructing the IDE to check each source root in turn.

Another heuristic you might use is to check whether a source file has a class file which is newer than the source file and all of the JARs in its classpath. If so, this means that _something_ successfully compiled this file recently, so any IDE error badges must be due either to

1. Incorrect ClassPath values in the IDE, such as from a misconfigured project; or

2. An IDE indexer bug, including a stale cache.

If #1 is the problem, recalculating will not help anything, but there is a good chance that the problem is in category #2.
Comment 1 Jesse Glick 2010-12-09 17:55:42 UTC
Bug #193183 has a more comprehensive proposal.

*** This bug has been marked as a duplicate of bug 193183 ***