mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
IDEA-69653 Complete Current Statement: Correct completion of 'init' section of 'for' statement
'Space after semicolon' code style property value is preserved during smart completion now
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
public class Foo {
|
||||
void test(int i) {
|
||||
for (int j = 1<caret>) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
public class Foo {
|
||||
void test(int i) {
|
||||
for (int j = 1;<caret>) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class Foo {
|
||||
void test(int i) {
|
||||
for (int j = 1<caret>) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
public class Foo {
|
||||
void test(int i) {
|
||||
for (int j = 1; <caret>) {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -203,6 +203,16 @@ public class CompleteStatementTest extends EditorActionTestCase {
|
||||
public void testNoUnnecessaryEmptyLineAtCodeBlock() throws Exception { doTest(); }
|
||||
|
||||
public void testForStatementGeneration() throws Exception { doTest(); }
|
||||
|
||||
public void testSpaceAfterSemicolon() throws Exception {
|
||||
CodeStyleSettingsManager.getSettings(getProject()).SPACE_AFTER_SEMICOLON = true;
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testNoSpaceAfterSemicolon() throws Exception {
|
||||
CodeStyleSettingsManager.getSettings(getProject()).SPACE_AFTER_SEMICOLON = false;
|
||||
doTest();
|
||||
}
|
||||
|
||||
private void doTestBracesNextLineStyle() throws Exception {
|
||||
CodeStyleSettings settings = CodeStyleSettingsManager.getSettings(getProject());
|
||||
|
||||
Reference in New Issue
Block a user