mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-82427 Code Completion produces bad code inside if brackets
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class Foo {
|
||||
{
|
||||
Assert.<caret>
|
||||
if (Assert.<caret>)
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import bar.Assert;
|
||||
|
||||
class Foo {
|
||||
{
|
||||
if (Assert.bar()<caret>)
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -45,7 +45,6 @@ import com.intellij.openapi.fileEditor.FileEditorManager
|
||||
import com.intellij.openapi.progress.ProgressManager
|
||||
import com.intellij.psi.PsiFile
|
||||
import com.intellij.psi.PsiJavaFile
|
||||
import com.intellij.util.Consumer
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
@@ -1230,7 +1229,8 @@ class Foo {{
|
||||
type 'fo\n'
|
||||
myFixture.checkResult '''import foo.Util;
|
||||
|
||||
class Foo {{ Util.foo();<caret> }}'''
|
||||
class Foo {{
|
||||
Util.foo();<caret> }}'''
|
||||
}
|
||||
|
||||
public void testPackageQualifier() {
|
||||
|
||||
+4
-2
@@ -1292,10 +1292,12 @@ public class ListUtils {
|
||||
}
|
||||
|
||||
public void testAllAssertClassesMethods() {
|
||||
myFixture.addClass 'package foo; public class Assert { public static void foo() {} }'
|
||||
myFixture.addClass 'package bar; public class Assert { public static void bar() {} }'
|
||||
myFixture.addClass 'package foo; public class Assert { public static boolean foo() {} }'
|
||||
myFixture.addClass 'package bar; public class Assert { public static boolean bar() {} }'
|
||||
configure()
|
||||
assert myFixture.lookupElementStrings == ['Assert.bar', 'Assert.foo']
|
||||
myFixture.type '\n'
|
||||
checkResult()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user