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 257027 - Provide API for Inspect&Transform feature (now for Java only)
Summary: Provide API for Inspect&Transform feature (now for Java only)
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.2
Hardware: All All
: P2 normal (vote)
Assignee: Milutin Kristofic
Depends on:
Reported: 2015-12-07 17:30 UTC by ilia
Modified: 2015-12-10 12:48 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description ilia 2015-12-07 17:30:20 UTC
There are a lot of analyzers in NetBeans which use Source->Inspect feature.
This is a useful one that allows a user to estimate quality of code.

However, using integrated analyzers almost always implies that a user wants to fix his code in-place.
For now the typical workflow (i.e. FindBugs analysis) is:
1) Source->Inspect select and analyze the whole project
2) Expand the result tree, maybe group errors by type
3) Navigate to an error in the tree (shows a corresponding line in a document)
5) Hit the hint button and apply a suggested fix (if any)
6) Repeat for all necessary errors

Applying all the fixes manually makes using Inspector unhandy, and there is no way for user to save results in xml/json/yaml/... for any kind of automation of fixes with a script later.

There is a solution for this problem hidden in Java Hints UI module, it appends the Inspect&Transform item into the Refactor menu.
It allows applying fixes directly from the Inspector tree, with previewing results.

Introducing the API suggested (on the editor level) would highly improve the usability of all analyzers.