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.
Another usefull suggestion : flip > with < if (a < b) -flip-> if (b > a) Rem : another IDE(a) provide a lot of operations of this kinds that can be very useful for refactoring operations
You can implement as an inspection <!description="Flip <>"> $a < $b => $b > $a ;; $a > $b => $b < $a ;;
Indeed, but the common mortal programmer won't do that. And inspect tasks are really hard to execute quickly. So everybody will do the flip manually. The main idea here is to have quick fixes/hints to help developer to do that kind of job quickly
Created attachment 131254 [details] Shows the hint based on the custom inspection (In reply to comment #2) > The main idea here is to have quick fixes/hints to help developer to do that > kind of job quickly Custom inspections ARE available as hints. See screenshot for an example.
Indeed, I test it and it works like a charm. That functionality should be more visible and maybe enable by default.
Worksforme (a < b) will be transformed to (a>=b) Has been fixed in 7.4 timeline (org.netbeans.modules.java.hints.suggestions.FlipOperands) https://netbeans.org/bugzilla/show_bug.cgi?id=225981 *** This bug has been marked as a duplicate of bug 225981 ***