private void showDialog(PsiMethod method,
                            PsiMethod methodToSearchFor,
                            PsiExpression[] occurrences,
                            IntroduceVariableBase.JavaReplaceChoice replaceChoice,
                            boolean delegate,
                            PsiType initializerType,
                            boolean mustBeFinal,
                            List<? extends UsageInfo> classMemberRefs, NameSuggestionsGenerator nameSuggestionGenerator) {
      final IntroduceParameterDialog dialog =
        new IntroduceParameterDialog(myProject, classMemberRefs, occurrences, myLocalVar, myExpr,
                                     nameSuggestionGenerator,
                                     createTypeSelectorManager(occurrences, initializerType), methodToSearchFor, method, getParamsToRemove(method, occurrences), mustBeFinal);
      dialog.setReplaceAllOccurrences(replaceChoice);
      dialog.setGenerateDelegate(delegate);
      if (dialog.showAndGet()) {
        final Runnable cleanSelectionRunnable = () -> {
          if (myEditor != null && !myEditor.isDisposed()) {
            myEditor.getSelectionModel().removeSelection();
          }
        };
        ApplicationManager.getApplication().invokeLater(cleanSelectionRunnable, ModalityState.any());
      }
    }
private void showDialog(PsiMethod method,
                            PsiMethod methodToSearchFor,
                            PsiExpression[] occurrences,
                            IntroduceVariableBase.JavaReplaceChoice replaceChoice,
                            boolean delegate,
                            PsiType initializerType,
                            boolean mustBeFinal,
                            List<? extends UsageInfo> classMemberRefs, NameSuggestionsGenerator nameSuggestionGenerator)