postfix template: reduce scope of 'try' IDEA-132878

This commit is contained in:
Andrey Starovoyt
2014-12-02 18:06:44 +03:00
parent 81dec7e4d7
commit f1fb09084b
10 changed files with 43 additions and 31 deletions
@@ -1,7 +1,9 @@
public class Foo {
void m() {
somevalue.try<caret>
doAct().try<caret>
int i=0;
}
void doAct() {}
}
@@ -1,11 +1,13 @@
public class Foo {
void m() {
try {
somevalue<caret>
doAct()
} catch (Exception e) {
e.printStackTrace();
}
int i=0;
}
void doAct() {}
}
@@ -0,0 +1,5 @@
public class Foo {
void m() {
aaaaaa.try<caret>
}
}
@@ -0,0 +1,5 @@
public class Foo {
void m() {
aaaaaa.try <caret>
}
}
@@ -1,5 +1,7 @@
public class Foo {
void m() {
somevalue.try<caret>
doAct().try<caret>
}
void doAct() {}
}
@@ -1,9 +1,11 @@
public class Foo {
void m() {
try {
somevalue<caret>
doAct()
} catch (Exception e) {
e.printStackTrace();
}
}
void doAct() {}
}
@@ -1,5 +0,0 @@
public class Foo {
void m() {
Object o = new Object().try<caret>
}
}
@@ -1,9 +0,0 @@
public class Foo {
void m() {
try {
Object o = new Object()<caret>
} catch (Exception e) {
e.printStackTrace();
}
}
}