mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
IDEA-123355 Postfix template expansions .null/.notnull after 'else' fail to provide a valid Java output
allow JavaWithIfExpressionSurrounder just after else keywords
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
class Test {
|
||||
boolean foo() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void bar() {
|
||||
if (true) {
|
||||
}
|
||||
else <selection>foo()</selection>
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Test {
|
||||
boolean foo() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void bar() {
|
||||
if (true) {
|
||||
}
|
||||
else <selection>foo()</selection>
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
class Test {
|
||||
boolean foo() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void bar() {
|
||||
if (true) {
|
||||
}
|
||||
else if (foo()) {
|
||||
<caret>
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
class Test {
|
||||
boolean foo() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void bar() {
|
||||
if (true) {
|
||||
}
|
||||
else if (foo()) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
public class Foo {
|
||||
void m(Object o) {
|
||||
if (true) {
|
||||
|
||||
}
|
||||
else o.notnull<caret>
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
public class Foo {
|
||||
void m(Object o) {
|
||||
if (true) {
|
||||
|
||||
}
|
||||
else if (o != null) {
|
||||
<caret>
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user