mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
CreateTypeParameterFromUsage: do not suggest fix when reference is part of class literal: IDEA-195266
This commit is contained in:
+1
@@ -165,6 +165,7 @@ public class CreateTypeParameterFromUsageFix extends BaseIntentionAction {
|
||||
if (parent instanceof PsiMethodCallExpression ||
|
||||
parent instanceof PsiJavaCodeReferenceElement ||
|
||||
parent instanceof PsiNewExpression ||
|
||||
(parent instanceof PsiTypeElement && parent.getParent() instanceof PsiClassObjectAccessExpression) ||
|
||||
element instanceof PsiReferenceExpression) {
|
||||
return null;
|
||||
}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Create type parameter 'A'" "false"
|
||||
|
||||
class B {
|
||||
void foo() {
|
||||
java.lang.Class a = A<caret>.class;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user