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 213895 - Inspect and Transform: Adding/Deleting Custom Inspection Temporarily Shows Hidden Inspections Without Transformations
Summary: Inspect and Transform: Adding/Deleting Custom Inspection Temporarily Shows Hi...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.2
Hardware: PC Windows Vista
: P1 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-10 01:44 UTC by MackSix
Modified: 2012-06-12 13:18 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (40.60 KB, image/png)
2012-06-10 01:44 UTC, MackSix
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2012-06-10 01:44:47 UTC
Created attachment 120609 [details]
Screenshot

1) Open a project that has overrides without @Override Annotations.
2) Do "Inspect and Transform" on the project.
3) Choose "Configuration" and "Default" and then click "Manage..." button.
4) Choose only "Add @Override Annotation" to add to configuration and click OK.
5) Click "Inspect" button.

A bogus warning comes up saying: "The selected configuration contains inspections that do not provide any transformations. No diff will be provided for code detected by such inspections. Use Source/Inspect... to perform code analysis."

It is not true, only 1 inspection is in configuration and it does have a transformation.

See screenshot. Regression -> P1

Product Version: NetBeans IDE Dev (Build 201206080001)
Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21
System: Windows Vista version 6.0 running on x86; Cp1252; en_US (nb)
Comment 1 MackSix 2012-06-10 02:04:18 UTC
Ok, I know how this happened. If you choose to Manage the configuration and click on the "New..." button, it adds a "Custom" node with "Inspection" inspection under it. 

Once this is done, all the previously unseen inspections that have no transformation are shown. If you click one of them and then delete the "Inspection" inspection that you just added, and reopen the dialog, the inspections with no transformations disappear and if one is checked, you can't see it.

So the workaround is to add custom inspection, then uncheck inspections with no transformation to make the warning go away.
Comment 2 MackSix 2012-06-10 02:07:14 UTC
Correction, once you add the Custom "Inspection" inspection, the inspections with no transformation disappear again.
Comment 3 Jan Lahoda 2012-06-11 08:44:43 UTC
The query-only inspections are show if they are checked:
http://hg.netbeans.org/jet-main/rev/ce8bcaf7502f
Comment 4 Quality Engineering 2012-06-12 13:18:22 UTC
Integrated into 'main-golden', will be available in build *201206120719* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ce8bcaf7502f
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #213895: in Inspect&Transform's configuration dialog, show only enabled query inspections to support existing configurations.