mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't suggest to complete class literals not in expressions
This commit is contained in:
@@ -156,7 +156,7 @@ public class JavaCompletionData extends JavaAwareCompletionData{
|
||||
public static final ElementPattern<PsiElement> START_FOR =
|
||||
psiElement().afterLeaf(psiElement().withText("(").afterLeaf("for")).withParents(PsiJavaCodeReferenceElement.class, PsiExpressionStatement.class, PsiForStatement.class);
|
||||
private static final PsiJavaElementPattern.Capture<PsiElement> CLASS_REFERENCE =
|
||||
psiElement().withParent(psiElement().referencing(psiClass()));
|
||||
psiElement().withParent(psiReferenceExpression().referencing(psiClass()));
|
||||
|
||||
public JavaCompletionData(){
|
||||
declareCompletionSpaces();
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
class Bar {
|
||||
static class Inner {}
|
||||
}
|
||||
|
||||
public class Foooo extends Bar.<caret>
|
||||
+5
@@ -744,6 +744,11 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
|
||||
assertStringItems 'final', 'finalize'
|
||||
}
|
||||
|
||||
public void testOnlyClassesInExtends() throws Throwable {
|
||||
configure()
|
||||
assertStringItems 'Inner'
|
||||
}
|
||||
|
||||
public void testPrimitiveTypesInForLoop() throws Throwable { doPrimitiveTypeTest() }
|
||||
public void testPrimitiveTypesInForLoop2() throws Throwable { doPrimitiveTypeTest() }
|
||||
public void testPrimitiveTypesInForLoop3() throws Throwable { doPrimitiveTypeTest() }
|
||||
|
||||
Reference in New Issue
Block a user