Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invert ternary if/else #32

Closed
markiewb opened this issue May 14, 2014 · 1 comment
Closed

Invert ternary if/else #32

markiewb opened this issue May 14, 2014 · 1 comment
Milestone

Comments

@markiewb
Copy link
Owner

See https://netbeans.org/bugzilla/show_bug.cgi?id=240079

(a != null) ? a.toString() : ""  
->
(a == null) ? "" : a.toString()

More pattern

        @TriggerPattern(value = "($var1 != null) ? $a : $b"),
        @TriggerPattern(value = "($var2 == null) ? $a : $b"),
        @TriggerPattern(value = "($var3 > $c) ? $a : $b"),
        @TriggerPattern(value = "($var4 < $c) ? $a : $b"),
        @TriggerPattern(value = "($var5 >= $c) ? $a : $b"),
        @TriggerPattern(value = "($var6 <= $c) ? $a : $b"),
@markiewb markiewb added this to the 1.2 milestone May 14, 2014
@markiewb markiewb changed the title Invert ternary Invert ternary if/else May 14, 2014
markiewb added a commit that referenced this issue May 14, 2014
@markiewb
Copy link
Owner Author

Fixed in 1.2

markiewb added a commit that referenced this issue May 14, 2014
* feature/issue32-invertternary:
  issue #32: Invert ternary if/else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant