@Override
    public void actionPerformed(@NotNull AnActionEvent e) {
      final RegExpDialog dialog =
        new RegExpDialog(e.getProject(), true, myReplace ? RegExpInspectionConfiguration.InspectionPattern.EMPTY_REPLACE_PATTERN : null);
      if (!dialog.showAndGet()) return;

      final RegExpInspectionConfiguration.InspectionPattern pattern = dialog.getPattern();
      final InspectionProfileModifiableModel profile = myPanel.getProfile();
      final CustomRegExpInspection inspection = CustomRegExpInspection.getCustomRegExpInspection(profile);
      final Project project = e.getData(CommonDataKeys.PROJECT);
      if (project == null) return;
      final InspectionMetaDataDialog metaDataDialog = inspection.createMetaDataDialog(project, profile.getDisplayName(), null);
      if (pattern.replacement() != null) {
        metaDataDialog.showCleanupOption(false);
      }
      if (!metaDataDialog.showAndGet()) return;

      final RegExpInspectionConfiguration configuration = new RegExpInspectionConfiguration(metaDataDialog.getName());
      configuration.addPattern(pattern);
      configuration.setDescription(metaDataDialog.getDescription());
      configuration.setSuppressId(metaDataDialog.getSuppressId());
      configuration.setProblemDescriptor(metaDataDialog.getProblemDescriptor());
      configuration.setCleanup(metaDataDialog.isCleanup());

      configuration.setUuid(null);
      inspection.addConfiguration(configuration);
      CustomRegExpInspection.addInspectionToProfile(project, profile, configuration);
      profile.setModified(true);
      profile.getProfileManager().fireProfileChanged(profile);
      myPanel.selectInspectionTool(configuration.getUuid());
    }
@Override
    public void actionPerformed(@NotNull AnActionEvent e)