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 216128 - Refreshing Inspect results
Summary: Refreshing Inspect results
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.2.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2012-07-30 11:21 UTC by Jan Lahoda
Modified: 2013-09-02 14:24 UTC (History)
2 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2012-07-30 11:21:04 UTC
This is a spin off of discussion from:
Please see that bug for the full preceding comments. I apologize it took me so long to set-up this issue.

(In reply to comment #34)
> So, if I lived in a compile-to-save world, I could still have a screens such as
> "Action Items" always open (instead of "Output") and expect NB to run the
> analysis on the changed files whenever they were saved, no?  I think that's
> what EasyPMD2 does (would have to check on that).  The question of the length
> of time a complete analysis would take would not occur.

The problem with re-analyzing only the changed files is that the warnings in one file generally depend on the content of other files. In FindBugs, there is a warning that a non-private field is unused, and obviously adding a usage of the field can remove the warning, and removing the usage can add the warning, even if the declaration and usage are in different files. So when a file is changed, other files may need to be reanalyzed as well, and doing that automatically would almost surely cause performance problems (we have something similar for the error badges, and that is much easier, much more precisely specified and much faster and it causes problems anyway).

Moreover, I am not convinced this is what the developer really needs: it does not show whether a warning is new since the last analysis, etc. What I have in mind is to have persistent Inspect window (with persistent content), and with ability to set-up a baseline, highlighting differences of the current run against the baseline, and e.g. showing only the new warnings since the baseline was set-up. But with an explicit refresh (eventually trying to limit the amount of reanalyzed files - probably easier with java.hints than with FindBugs), so that it does not interfere with ordinary IDE tasks (might possibly also run on background, although there is a problem with the user experience of refreshing UI). Could also be run before commit, to check if new warnings have been introduced, possibly setting-up a new baseline.

Not sure how much (if anything) of that can be done for 7.2, but that is my idea so far.