mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
fix PIEAE
This commit is contained in:
+4
-4
@@ -49,10 +49,6 @@ class ConstructorInsertHandler implements InsertHandler<LookupElementDecorator<L
|
||||
public void handleInsert(InsertionContext context, LookupElementDecorator<LookupItem> item) {
|
||||
@SuppressWarnings({"unchecked"}) final LookupItem<PsiClass> delegate = item.getDelegate();
|
||||
|
||||
final PsiElement position = SmartCompletionDecorator.getPosition(context, delegate);
|
||||
final PsiExpression enclosing = PsiTreeUtil.getContextOfType(position, PsiExpression.class, true);
|
||||
final PsiAnonymousClass anonymousClass = PsiTreeUtil.getParentOfType(position, PsiAnonymousClass.class);
|
||||
final boolean inAnonymous = anonymousClass != null && anonymousClass.getParent() == enclosing;
|
||||
PsiClass psiClass = (PsiClass)item.getObject();
|
||||
|
||||
boolean isAbstract = psiClass.hasModifierProperty(PsiModifier.ABSTRACT);
|
||||
@@ -68,6 +64,10 @@ class ConstructorInsertHandler implements InsertHandler<LookupElementDecorator<L
|
||||
|
||||
OffsetKey insideRef = context.trackOffset(context.getTailOffset(), false);
|
||||
|
||||
final PsiElement position = SmartCompletionDecorator.getPosition(context, delegate);
|
||||
final PsiExpression enclosing = PsiTreeUtil.getContextOfType(position, PsiExpression.class, true);
|
||||
final PsiAnonymousClass anonymousClass = PsiTreeUtil.getParentOfType(position, PsiAnonymousClass.class);
|
||||
final boolean inAnonymous = anonymousClass != null && anonymousClass.getParent() == enclosing;
|
||||
boolean fillTypeArgs = false;
|
||||
if (delegate instanceof PsiTypeLookupItem) {
|
||||
fillTypeArgs = !isRawTypeExpected(context, (PsiTypeLookupItem)delegate) &&
|
||||
|
||||
Reference in New Issue
Block a user