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.
Please don't throw this out just because it refers to 3rd party software... FindBugs is open source and an incredible resource for finding bugs and stylistic problems in any Java software. Surely FindBugs could be seemlessly integrated into the Java hints system? FindBugs already has detectors and explanations... there is no need for automatic fixes to be provided. The SQE plugin attempts to provide FindBugs functionality to NetBeans, but it is really really horrible and a disaster in UI design. The goal of this RFE would be to give the power of FindBugs detectors to Netbeans, without the end user even needing to know that findbugs was doing the work.
Could you perhaps be more precise about the UI? Any ideas what can / should be improved? Do not hesitate to use the SQE mailinglist or issuetracker to request enhancements.
@sreimers the UI problem with SQE is that there *is* a UI! There is absolutely no need for a UI. FindBugs finds problems, and they should be shown using the Netbeans Hints framework (yellow/red underlined with mouse-over actions available). FindBugs could be run every time the file is saved and the FindBugs explanations used for the popups. There is no configuration necessary, except perhaps to "ignore this bug" or "ignore all bugs like this" (available during mouse-over, undo-able), which would then store the preferences in a config file in the nbproject folder. SQE-specific (and not related to this FindBugs RFE) I would say the recommendations made by PMD and CheckStyle are simply atrocious. No need to use them at all. Secondly, the SQE plugin should be *ONE* plugin, not THREE! Additionally, if you really must have a control panel UI, then put it in the NetBeans preferences, not in its own window. And lastly... if you have buttons (e.g. checklists to select the backends, or refresh buttons), they really ought to do what they claim to do... last SQE I used, both those buttons were ignored. I found SQE to be so painful to use that I ended up using command-line FindBugs.
I also believe that FindBugs should be integrated into NetBeans as fommil suggested. I use FindBugs since NB 5, but can't use it in NB 6.7. Fommil's ideas are very interesting. It's pretty an enhancement of how CheckStyle Beans is integrated into NetBeans. I think that "just" having FindBugs integrated into NB without the possibility of enabling/disabling detectors for a specific line will be a huge step forward for all the developers using NB.
I already have a working prototype using hints (and quick fixes) and hope to release the Real Soon Now (TM).
@sreimers wow, excellent! I can't wait to see it... but please, you should have commented here that you were beginning work. We almost had a major task- duplication problem ;-P Could you please elaborate on what the support will look like?
The actual implementation is rescan on compile on a per file basis. All old-style workflow parts are still available as well. The old annotation logic is still in there but will be removed, so only hints / quick fixes remain. There are plans for adding a possibility to add quickfixes using the layer file system, but work on this has not started. Only quick fix available right now, is disabling detector (this needs fine-tuning as well). I really hope to get this out of the door real soon now, but my day work keeps interfering.
This feature is currently available via http://sqe.kenai.com or the continous build update center at http://deadlock.netbeans.org/hudson/job/sqe/lastStableBuild/artifact/build/full-sqe-updatecenter/updates.xml
@sreimers the whole point of this feature request is to have a much cleaner integration of FindBugs and the Java Hints module. The SQE plugin does not achieve this, and in fact has a much larger mandate.
@fommil Still not sure I get your point. Did you try the latest version of SQE? It adds hints for everything FindBugs detects - what else do you expect? There is even a first "Quick Fix" to add a suppress warnings annotation so that FindBugs will ignore those in future runs. There is overhead in this solution, but I think the main part is configuring FindBugs for your project, so you will not get warnings you were never interested in. What did I miss?
I just installed the new plug in and it looks very interesting. I feel most people in the community will be very pleased with this new addition! I noticed that the Quality Control Center has hard coded colors and it does not blend as well as the other components of NB if you have a theme set (in my case the whole OS has a dark theme because we work in a dark environment). I am attaching a picture of it so you can see what I am talking about.
Created attachment 93194 [details] Screenshot of the problem
@sreimers I've tried the latest SQE plugin - it is a *LOT* better than the previous version, but I do not believe it satisfies this RFE. This RFE is for seemless integration of FindBugs into the hints, whereas the plugin:- * requires manual scanning * provides a useless folder in the Project view * uses up screen space in the Menu with a Quality entry If the plugin satisfied the RFE, it would provide all configuration under Hints -> Java -> FindBugs and hints would be provided as mouse-overs on the hint warning - and there would be no "bug" icon. Also, if I double click on a bug in the FindBugs window it will highlight it in the editor window - even if the bug has already been fixed.
Hmm, ok - so the latest SQE plugin does a refresh every so often. Nice. Scrap that complaint then - but it still needs work.
Do you think that an on-demand scan in the popup menu in the project tree could be a possible solution to the high refresh rate of the plugin? The plugin is causing most of my time-limited tests to fail (like gui and performance tests) because it starts scanning when running the tests.
I quite like the auto-scan, but I admit, it could do with being less frequent! An automatic scan when opening up NetBeans, or the project, would be sufficient for my purposes. Perhaps even once an hour, or something of that order of magnitude. If there were no performance penalty, scan on save would be optimal, of course.
Findbugs was natively integrated into NB7.2. This also includes hint-support. So closing this issue. For more details see http://netbeans.org/kb/docs/java/code-inspect.html#fb