IDEA-68635 Completion inserts new line on SPACE

This commit is contained in:
peter
2011-04-26 16:38:50 +02:00
parent 40cb6b363c
commit f989781cfd
4 changed files with 22 additions and 1 deletions

View File

@@ -759,7 +759,7 @@ public class JavaCompletionUtil {
String name = psiClass.getName();
document.replaceString(startOffset, endOffset, name);
final RangeMarker toDelete = insertTemporary(startOffset + name.length(), document, ";");
final RangeMarker toDelete = insertTemporary(startOffset + name.length(), document, "#");
PsiDocumentManager.getInstance(project).commitAllDocuments();

View File

@@ -0,0 +1,7 @@
class Xxx {
{
if (ABCDEF<caret>aaa.bbb()) {
}
}
}

View File

@@ -0,0 +1,9 @@
import foo.ABCDEFFFFF;
class Xxx {
{
if (ABCDEFFFFF<caret>aaa.bbb()) {
}
}
}

View File

@@ -853,6 +853,11 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
doTest('\n')
}
public void testClassNameInIfBeforeIdentifier() throws Throwable {
myFixture.addClass("package foo; public class ABCDEFFFFF {}")
doTest('\n')
}
public void testClassNameWithInnersTab() throws Throwable { doTest('\t') }
public void testClassNameWithGenericsTab() throws Throwable {doTest('\t') }