public static void triggerAction(Configuration config, @NotNull SearchContext searchContext, boolean replace) {
    final Project project = searchContext.getProject();
    PsiDocumentManager.getInstance(project).commitAllDocuments();

    final DialogWrapper dialog = StructuralSearchPlugin.getInstance(project).getDialog();
    if (dialog != null) {
      assert !dialog.isDisposed() && dialog.isVisible();
      final JComponent component = dialog.getPreferredFocusedComponent();
      assert component != null;
      IdeFocusManager.getInstance(project).requestFocus(component, true);
      return;
    }

    final StructuralSearchDialog searchDialog = new StructuralSearchDialog(searchContext, replace);
    if (config != null) {
      searchDialog.loadConfiguration(config);
    }
    StructuralSearchPlugin.getInstance(project).setDialog(searchDialog);
    searchDialog.show();
  }
public static void triggerAction(Configuration config, @NotNull SearchContext searchContext, boolean replace)