void perform(final String oldText, Editor editor, boolean silently) {
    final PsiMethod method = getSuperMethod();

    Project project = getMethod().getProject();
    final PsiMethod currentMethod = getMethod();
    final TextRange signatureRange = JavaChangeSignatureDetector.getSignatureRange(currentMethod);
    final PsiDocumentManager documentManager = PsiDocumentManager.getInstance(project);
    final Document document = documentManager.getDocument(currentMethod.getContainingFile());
    if (silently || ApplicationManager.getApplication().isUnitTestMode()) {
      final String currentSignature = signatureRange.substring(currentMethod.getContainingFile().getText());
      InplaceChangeSignature.temporallyRevertChanges(JavaChangeSignatureDetector.getSignatureRange(currentMethod), document, oldText, project);
      PsiMethod prototype;
      if (isGenerateDelegate()) {
        for (JavaParameterInfo info : getNewParameters()) {
          if (info.isNew()) {
            ((ParameterInfoImpl)info).setDefaultValue("null"); //to be replaced with template expr
          }
        }
        prototype = JavaChangeSignatureUsageProcessor.generateDelegatePrototype(this);
      }
      else {
        prototype = null;
      }
      createChangeSignatureProcessor(method).run();
      InplaceChangeSignature.temporallyRevertChanges(JavaChangeSignatureDetector.getSignatureRange(currentMethod), document, currentSignature, project);
      if (prototype != null) {
        WriteCommandAction.runWriteCommandAction(project, JavaBundle.message("command.name.delegate.detected.change"), null, () -> {
          PsiMethod delegate = currentMethod.getContainingClass().findMethodBySignature(prototype, false);
          PsiExpression expression = delegate != null ? LambdaUtil.extractSingleExpressionFromBody(delegate.getBody()) : null;
          if (expression instanceof PsiMethodCallExpression) {

            PsiExpression[] expressions = ((PsiMethodCallExpression)expression).getArgumentList().getExpressions();
            JavaParameterInfo[] parameters = getNewParameters();
            PsiExpression[] toBeDefault =
              Arrays.stream(parameters)
                .filter(ParameterInfo::isNew)
                .map(info -> {
                  int i = ArrayUtil.find(parameters, info);
                  return expressions[i];
                }).toArray(PsiExpression[]::new);
            startTemplate(project, editor, toBeDefault, delegate);
          }
        });
      }
      return;
    }
    final JavaMethodDescriptor descriptor = new JavaMethodDescriptor(currentMethod) {
      @Override
      public String getReturnTypeText() {
        return getNewReturnType().getTypeText();
      }
    };
    final JavaChangeSignatureDialog dialog =
      new JavaChangeSignatureDialog(method.getProject(), descriptor, true, method) {
        @Override
        protected BaseRefactoringProcessor createRefactoringProcessor() {
          return createChangeSignatureProcessor(method);
        }

        @Override
        protected void invokeRefactoring(final BaseRefactoringProcessor processor) {
          CommandProcessor.getInstance().executeCommand(myProject, () -> {
            InplaceChangeSignature.temporallyRevertChanges(JavaChangeSignatureDetector.getSignatureRange(currentMethod), document, oldText, project);
            doRefactor(processor);
          }, RefactoringBundle.message("changeSignature.refactoring.name"), null);
        }

        private void doRefactor(BaseRefactoringProcessor processor) {
          super.invokeRefactoring(processor);
        }
      };
    dialog.showAndGet();
  }
void perform(final String oldText, Editor editor, boolean silently)