I would love this kind of feature.
+1
How about being able to convert a "else if" into a "select/case"
Florian Hehlen
-----Original Message-----
From: thomas.singer
Sent: Freitag, 2. November 2001 10:05
To: eap-features
Cc: thomas.singer
Subject: [Eap-features] New feature idea: inverse boolean values
Hello,
I sometimes (even now) would find it really cool to have the ability to
inverse a boolean value.
1) If/else statements
=====================
I needed to transform following code
if (!isSomething()) {
return someOther;
}
return someOther2;
into
if (!isSomething()) {
return someOther;
}
else {
return someOther2;
}
Since this looks odd, it would be cool, if IDEA could switch it around:
if (isSomething()) {
return someOther2;
}
else {
return someOther;
}
2) Return values
================
A method isFalse() returned an value that was used on some other parts
of
our project.
Now I wanted to reverse it's result (and rename it to isTrue()).
IDEA should be able to toggle the used results around. Example: Anywhere
following lines existed:
if (isFalse()) {
doThis();
}
No it should look like this:
if (!isTrue()) {
doThis();
}
3) Simplify some boolean expressions
====================================
On really bad code I found following:
if (!(a == b)) {
}
This should be simplified (or made better readable) to:
if (a != b) {
}
Or less readable:
if (!(a == b || c == d)) {
}
could be better transformed to:
if (a != b && c != d) {
}
Best regards
Thomas Singer
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features
Visit our website at http://www.ubswarburg.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features