mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-118100 Annotation enum attribute auto-completion
This commit is contained in:
@@ -307,7 +307,8 @@ public class ExpectedTypesProvider {
|
||||
if (type == null) return;
|
||||
final ExpectedTypeInfoImpl info = createInfoImpl(type, ExpectedTypeInfo.TYPE_OR_SUBTYPE, type, TailType.UNKNOWN);
|
||||
if (type instanceof PsiArrayType) {
|
||||
myResult = new ExpectedTypeInfo[]{info, createInfoImpl(((PsiArrayType)type).getComponentType(), ExpectedTypeInfo.TYPE_OR_SUBTYPE, type, TailType.UNKNOWN)};
|
||||
PsiType componentType = ((PsiArrayType)type).getComponentType();
|
||||
myResult = new ExpectedTypeInfo[]{info, createInfoImpl(componentType, ExpectedTypeInfo.TYPE_OR_SUBTYPE, componentType, TailType.UNKNOWN)};
|
||||
}
|
||||
else {
|
||||
myResult = new ExpectedTypeInfo[] {info};
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
public class Foo {
|
||||
@MyAnno(value = <caret>)
|
||||
}
|
||||
|
||||
@interface MyAnno {
|
||||
MyEnum[] value();
|
||||
}
|
||||
|
||||
enum MyEnum { FOO, BAR }
|
||||
+4
@@ -620,4 +620,8 @@ interface TxANotAnno {}
|
||||
checkPreferredItems 0, 'String', 'System', 'Set'
|
||||
}
|
||||
|
||||
public void testAnnotationEnum() {
|
||||
checkPreferredItems 0, 'MyEnum.BAR', 'MyEnum', 'MyEnum.FOO'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user