mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
workaround EA-69947 - IOE: PsiReferenceExpressionImpl.bindToElementViaStaticImport
This commit is contained in:
@@ -159,6 +159,9 @@ public class VariableLookupItem extends LookupItem<PsiVariable> implements Typed
|
||||
final PsiReferenceExpression
|
||||
ref = PsiTreeUtil.findElementOfClassAtOffset(context.getFile(), context.getStartOffset(), PsiReferenceExpression.class, false);
|
||||
if (ref != null) {
|
||||
if (ref.isQualified()) {
|
||||
return; // shouldn't happen, but sometimes we see exceptions because of this
|
||||
}
|
||||
ref.bindToElementViaStaticImport(((PsiField)variable).getContainingClass());
|
||||
PostprocessReformattingAspect.getInstance(ref.getProject()).doPostponedFormatting();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user