temp reject inplace change signature for super methods
authorAnna.Kozlova <anna.kozlova@jetbrains.com>
Thu, 10 Nov 2016 18:39:16 +0000 (19:39 +0100)
committerAnna.Kozlova <anna.kozlova@jetbrains.com>
Fri, 11 Nov 2016 09:13:43 +0000 (10:13 +0100)
java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeSignatureHandler.java
platform/lang-impl/src/com/intellij/refactoring/changeSignature/inplace/InplaceChangeSignature.java

index d5d47bb8509392e4b4dc0e4566aa4d82689c9bdf..5737c085fe058e9700d2bda717c26dd5f93f90c9 100644 (file)
@@ -92,7 +92,7 @@ public class JavaChangeSignatureHandler implements ChangeSignatureHandler {
     final PsiClass containingClass = method.getContainingClass();
     final PsiReferenceExpression refExpr = editor != null ? JavaTargetElementEvaluator.findReferenceExpression(editor) : null;
     final boolean allowDelegation = containingClass != null && (!containingClass.isInterface() || PsiUtil.isLanguageLevel8OrHigher(containingClass));
-    InplaceChangeSignature inplaceChangeSignature = InplaceChangeSignature.getCurrentRefactoring(editor);
+    InplaceChangeSignature inplaceChangeSignature = editor != null ? InplaceChangeSignature.getCurrentRefactoring(editor) : null;
     ChangeInfo initialChange = inplaceChangeSignature != null ? inplaceChangeSignature.getStableChange() : null;
 
     boolean isInplace = Registry.is("inplace.change.signature") && editor != null && editor.getSettings().isVariableInplaceRenameEnabled() && (initialChange == null || initialChange.getMethod() != method);
index f612d07b36b31853722a4a137a5f06dd971161f4..d5c6c93f66299f3f4857478264f6f64f46939699 100644 (file)
@@ -106,7 +106,7 @@ public class InplaceChangeSignature implements DocumentListener {
   }
 
   @Nullable
-  public static InplaceChangeSignature getCurrentRefactoring(Editor editor) {
+  public static InplaceChangeSignature getCurrentRefactoring(@NotNull Editor editor) {
     return editor.getUserData(INPLACE_CHANGE_SIGNATURE);
   }