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 225984 - Suggestion : flip > with <
Summary: Suggestion : flip > with <
Status: RESOLVED DUPLICATE of bug 225981
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-11 13:35 UTC by lforet
Modified: 2014-05-14 16:11 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Shows the hint based on the custom inspection (2.40 KB, image/png)
2013-02-11 16:35 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lforet 2013-02-11 13:35:42 UTC
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
Comment 1 markiewb 2013-02-11 15:52:52 UTC
You can implement as an inspection

<!description="Flip &lt;&gt;">
$a < $b 
=>
$b > $a
;;
$a > $b 
=>
$b < $a
;;
Comment 2 lforet 2013-02-11 16:02:34 UTC
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
Comment 3 markiewb 2013-02-11 16:35:24 UTC
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.
Comment 4 lforet 2013-02-12 10:07:53 UTC
Indeed, I test it and it works like a charm. 

That functionality should be more visible and maybe enable by default.
Comment 5 markiewb 2014-05-14 16:11:14 UTC
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 ***