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.
I'm not sure what this "hint" is for - it is not really a hint about something you are doing wrong - but it seems rather dangerous. If you have if (a != b) doWhatever(); and you see "doWhatever();" underlined, you will think: "ah, if-statement without braces; I will use Alt-ENTER ENTER to accept the suggested fix". And usually this works. But depending on timing of your keystrokes, sometimes "Negate if condition" comes first, so that rather than if (a != b) { doWhatever(); } you wind up with if (a == b) doWhatever(); ! If you are not paying close attention, you can introduce subtle logic bugs into your code this way. Please consider deleting the "Negate if condition" context menu item; surely typing an exclamation point is easier than accepting this hint anyway. (You're not going to have menu items to "Add 1 to number", are you?)
This is a special kind of "hints", called suggestions. It does not say that something is wrong, but rather allows the user to do something simply by using a fix rather then by hand. There are more such suggestions, e.g. Assign Result to a New Variable, Convert Annonymous to Inner, etc. Tranditionally, there was no UI for suggestions, and so some of them where incorrectly listed under General category in Hints. I have created a special category for the suggestions under the Hint tab in options for now: http://hg.netbeans.org/jet-main/rev/10e41de42089 So the suggestions can be disabled in the same way as hints. I have also put this particular fix below other "normal" fixes: http://hg.netbeans.org/main/contrib/rev/0c330887b652 While typing '!' is simple, moving caret to the correct place, wrapping the condition with parentheses if needed and possibly applying De Morgan's laws (to simplify the expression) can be more work than pressing Alt-Enter and so I still think the suggestion is meaningful.
Integrated into 'main-golden', will be available in build *201005040200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ User: Log: