@Override
  public @Nullable <T> ExtractMethodSettings<T> showExtractMethodDialog(Project project,
                                                                        String defaultName,
                                                                        CodeFragment fragment,
                                                                        T[] visibilityVariants,
                                                                        ExtractMethodValidator validator,
                                                                        ExtractMethodDecorator<T> decorator,
                                                                        FileType type,
                                                                        String helpId) {
    final AbstractExtractMethodDialog<T> dialog =
      new AbstractExtractMethodDialog<>(project, defaultName, fragment, visibilityVariants, validator, decorator, type) {
        @Override
        protected String getHelpId() {
          return helpId;
        }
      };
    dialog.show();

    //return if don`t want to extract method
    if (!dialog.isOK()) {
      return null;
    }
    else {
      return dialog;
    }
  }
@Override
  public @Nullable <T> ExtractMethodSettings<T> showExtractMethodDialog(Project project,
                                                                        String defaultName,
                                                                        CodeFragment fragment,
                                                                        T[] visibilityVariants,
                                                                        ExtractMethodValidator validator,
                                                                        ExtractMethodDecorator<T> decorator,
                                                                        FileType type,
                                                                        String helpId)