mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
EA-40795 - NPE: IntentionUtils.createTemplateForMethod
This commit is contained in:
+1
-1
@@ -84,7 +84,7 @@ public class CreateMethodFromUsageFix implements IntentionAction {
|
||||
info.insert(myTargetClass, findInsertionAnchor(info), false);
|
||||
method = info.getPsiMember();
|
||||
|
||||
final PsiElement context = PsiTreeUtil.getParentOfType(myRefExpression, PsiClass.class, PsiMethod.class);
|
||||
final PsiElement context = PsiTreeUtil.getParentOfType(myRefExpression, PsiClass.class, PsiMethod.class, PsiFile.class);
|
||||
IntentionUtils.createTemplateForMethod(argTypes, paramTypesExpressions, method, myTargetClass, constraints, false, context);
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public class IntentionUtils {
|
||||
PsiClass owner,
|
||||
TypeConstraint[] constraints,
|
||||
boolean isConstructor,
|
||||
final PsiElement context) {
|
||||
@NotNull final PsiElement context) {
|
||||
|
||||
final Project project = owner.getProject();
|
||||
PsiTypeElement typeElement = method.getReturnTypeElement();
|
||||
|
||||
Reference in New Issue
Block a user