IDEA-69972 Smart Complete Statement: Leave code block if the action is called for the complete statement

This commit is contained in:
Denis Zhdanov
2011-05-20 18:14:46 +04:00
parent 3db9975ca2
commit 0e58d431cd
11 changed files with 159 additions and 45 deletions

View File

@@ -2,6 +2,6 @@
public class Foo {
{
foo(x);
<caret>
}
<caret>
}

View File

@@ -1,6 +1,6 @@
public class Foo {
public void foo() {
String s = "abcdef";
<caret>
}
<caret>
}

View File

@@ -0,0 +1,7 @@
public class Foo {
void test(int i) {
if (i > 1) {
i <caret>= 1;
}
}
}

View File

@@ -0,0 +1,8 @@
public class Foo {
void test(int i) {
while (i-- > 1) {
i <caret>= 1;
}
}
}

View File

@@ -0,0 +1,8 @@
public class Foo {
void test(int i) {
while (i-- > 1) {
i = 1;
}
<caret>
}
}

View File

@@ -0,0 +1,8 @@
public class Foo {
void test(int i) {
if (i > 1) {
i = 1;
}
<caret>
}
}

View File

@@ -2,6 +2,6 @@
public class Test {
public void foo() {
int x = 2;
<caret>
}
<caret>
}