in field type, don't suggest fields&methods (IDEA-65639)

This commit is contained in:
peter
2011-02-22 18:58:42 +01:00
parent e45424a2d3
commit 261bfa77a9
4 changed files with 12 additions and 4 deletions
@@ -755,7 +755,7 @@ public class PsiJavaCodeReferenceElementImpl extends CompositePsiElement impleme
}
else {
while (superParent != null) {
if (superParent instanceof PsiCodeBlock || superParent instanceof PsiVariable) {
if (superParent instanceof PsiCodeBlock || superParent instanceof PsiLocalVariable) {
smartCompletion = false;
break;
}
@@ -763,8 +763,6 @@ public class PsiJavaCodeReferenceElementImpl extends CompositePsiElement impleme
}
}
if (!smartCompletion && !isCodeFragmentType(getTreeParent().getElementType()) && !(getParent() instanceof PsiAnnotation)) {
/*filter.addFilter(ElementClassFilter.CLASS);
filter.addFilter(ElementClassFilter.PACKAGE);*/
filter.addFilter(new AndFilter(ElementClassFilter.METHOD, new NotFilter(new ConstructorFilter())));
filter.addFilter(ElementClassFilter.VARIABLE);
}
@@ -0,0 +1,4 @@
class A {
private lo<caret> localizedStringManager;
}
@@ -0,0 +1,4 @@
class A {
private long <caret>localizedStringManager;
}
@@ -356,10 +356,12 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
checkResult()
}
public void testFieldType() throws Throwable { doTest(); }
public void testPackageInAnnoParam() throws Throwable {
doTest();
}
public void testClassLiteralInAnnoParam() throws Throwable {
doTest();
}