private void doApplyFix(final RefEntity @NotNull [] refElements, @NotNull InspectionResultsView view) {
    final boolean[] refreshNeeded = {false};
    if (refElements.length > 0) {
      final Project project = refElements[0].getRefManager().getProject();
      CommandProcessor.getInstance().executeCommand(project, () -> {
        CommandProcessor.getInstance().markCurrentCommandAsGlobal(project);
        ApplicationManager.getApplication().runWriteAction(() -> {
          refreshNeeded[0] = applyFix(refElements);
        });
      }, getTemplatePresentation().getText(), null);
    }
    if (refreshNeeded[0]) {
      refreshViews(view.getProject(), refElements, myToolWrapper);
    }
  }
private void doApplyFix(final RefEntity @NotNull [] refElements, @NotNull InspectionResultsView view)