mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[groovy] do not offer to select reference expression if it is resolved to class and has reference parent.
Cover cases when it is qualified name like `SomeClass` in `SomeClass.InnerClass` or `SomeClass.STATIC_FIELD` should not be considered as an expression.
This commit is contained in:
+4
-1
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -216,6 +216,9 @@ public abstract class GrIntroduceHandlerBase<Settings extends GrIntroduceSetting
|
||||
if (expression instanceof GrParenthesizedExpression && !expressions.contains(((GrParenthesizedExpression)expression).getOperand())) {
|
||||
expressions.add(((GrParenthesizedExpression)expression).getOperand());
|
||||
}
|
||||
if (expression.getParent() instanceof GrReferenceExpression
|
||||
&& expression instanceof GrReferenceExpression
|
||||
&& ((GrReferenceExpression)expression).resolve() instanceof PsiClass) continue;
|
||||
if (expressionIsIncorrect(expression, acceptVoidCalls)) continue;
|
||||
|
||||
expressions.add(expression);
|
||||
|
||||
Reference in New Issue
Block a user