mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
IDEA-90142 Do not propose contant names after '@'
This commit is contained in:
@@ -113,7 +113,8 @@ public class JavaCompletionContributor extends CompletionContributor {
|
||||
}
|
||||
|
||||
if (JavaCompletionData.DECLARATION_START.accepts(position) ||
|
||||
JavaCompletionData.isInsideParameterList(position)) {
|
||||
JavaCompletionData.isInsideParameterList(position) ||
|
||||
psiElement().inside(psiElement(PsiJavaCodeReferenceElement.class).withParent(psiAnnotation())).accepts(position)) {
|
||||
return new OrFilter(ElementClassFilter.CLASS, ElementClassFilter.PACKAGE_FILTER);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import static BeanUtil.A.NOT_NULL;
|
||||
class BeanUtil {
|
||||
public static class A {
|
||||
public static final Object NOT_NULL = null;
|
||||
}
|
||||
@NN<caret>
|
||||
String foo() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@interface NotNull {}
|
||||
@@ -0,0 +1,12 @@
|
||||
import static BeanUtil.A.NOT_NULL;
|
||||
class BeanUtil {
|
||||
public static class A {
|
||||
public static final Object NOT_NULL = null;
|
||||
}
|
||||
@NotNull<caret>
|
||||
String foo() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@interface NotNull {}
|
||||
@@ -991,6 +991,7 @@ public class ListUtils {
|
||||
public void testLiveTemplatePrefixTab() throws Throwable {doTest('\t') }
|
||||
|
||||
public void testOnlyAnnotationsAfterAt() throws Throwable { doTest() }
|
||||
public void testOnlyAnnotationsAfterAt2() throws Throwable { doTest() }
|
||||
|
||||
public void testOnlyExceptionsInCatch1() throws Exception { doTest('\n') }
|
||||
public void testOnlyExceptionsInCatch2() throws Exception { doTest('\n') }
|
||||
|
||||
Reference in New Issue
Block a user