mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 03:21:12 +07:00
disable import static constant at annotation position
This commit is contained in:
@@ -60,7 +60,8 @@ public class StaticImportConstantFix extends StaticImportMemberFix<PsiField> {
|
||||
String name = element != null ? element.getReferenceName() : null;
|
||||
if (name == null) return Collections.emptyList();
|
||||
if (element instanceof PsiExpression && PsiUtil.isAccessedForWriting((PsiExpression)element) ||
|
||||
element.getParent() instanceof PsiTypeElement) {
|
||||
element.getParent() instanceof PsiTypeElement ||
|
||||
element.getParent() instanceof PsiAnnotation) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
final StaticMembersProcessor<PsiField> processor = new StaticMembersProcessor<PsiField>(element) {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Import static constant 'foo.B.K'" "false"
|
||||
package foo;
|
||||
|
||||
@<caret>K
|
||||
public class X {
|
||||
}
|
||||
|
||||
class B {
|
||||
public static Object K = null;
|
||||
}
|
||||
Reference in New Issue
Block a user