@Override
  protected @NotNull ArrayList<AnAction> createActions(boolean fromPopup) {
    ArrayList<AnAction> result = new ArrayList<>();
    result.add(new MyAddActionGroup(fromPopup));
    result.add(new MyDeleteAction());
    result.add(new DumbAwareAction(
      CopyrightBundle.messagePointer("action.DumbAware.CopyrightProfilesPanel.text.copy"),
      CopyrightBundle.messagePointer("action.DumbAware.CopyrightProfilesPanel.description.copy"),
      PlatformIcons.COPY_ICON) {
      {
        registerCustomShortcutSet(CommonShortcuts.getDuplicate(), myTree);
      }

      @Override
      public void actionPerformed(@NotNull AnActionEvent event) {
        String profileName = askForProfileName(CopyrightBundle.message("copy.copyright.profile"), "");
        if (profileName == null) {
          return;
        }

        CopyrightProfile clone = new CopyrightProfile();
        @Nullable CopyrightProfile profile = null;
        boolean sharedProfile = true;
        final TreePath selectionPath = myTree.getSelectionPath();
        if (selectionPath != null && selectionPath.getLastPathComponent() instanceof MyNode node) {
          final NamedConfigurable<?> configurable = node.getConfigurable();
          LOG.assertTrue(configurable != null, "already disposed");
          profile = (CopyrightProfile)configurable.getEditableObject();
          sharedProfile = ((CopyrightConfigurable)configurable).isShareProfile();
        }
        CopyrightProfile copyrightProfile = Objects.requireNonNull(profile);
        clone.copyFrom(copyrightProfile);
        clone.setName(profileName);
        addProfileNode(clone, sharedProfile);
      }

      @Override
      public void update(@NotNull AnActionEvent event) {
        event.getPresentation().setEnabled(getSelectedObject() != null);
      }

      @Override
      public @NotNull ActionUpdateThread getActionUpdateThread() {
        return ActionUpdateThread.EDT;
      }
    });
    result.add(new DumbAwareAction(CopyrightBundle.messagePointer("action.DumbAware.CopyrightProfilesPanel.text.import"),
                                   CopyrightBundle.messagePointer("action.DumbAware.CopyrightProfilesPanel.description.import"),
                                   PlatformIcons.IMPORT_ICON) {
      @Override
      public void actionPerformed(@NotNull AnActionEvent event) {
        FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor()
          .withFileFilter(file -> {
            final FileType fileType = file.getFileType();
            return fileType == ModuleFileType.INSTANCE || fileType == XmlFileType.INSTANCE;
          })
          .withTitle(CopyrightBundle.message("dialog.file.chooser.title.choose.file.containing.copyright.notice"));
        FileChooser.chooseFile(descriptor, myProject, null, file -> {
          final List<CopyrightProfile> profiles = ExternalOptionHelper.loadOptions(VfsUtilCore.virtualToIoFile(file));
          if (profiles == null) return;
          if (!profiles.isEmpty()) {
            if (profiles.size() == 1) {
              importProfile(profiles.get(0));
            }
            else {
              JBPopupFactory.getInstance()
                .createListPopup(new BaseListPopupStep<>(CopyrightBundle.message("popup.title.choose.profile.to.import"), profiles) {
                  @Override
                  public PopupStep<?> onChosen(final CopyrightProfile selectedValue, boolean finalChoice) {
                    return doFinalStep(() -> importProfile(selectedValue));
                  }

                  @NotNull
                  @Override
                  public String getTextFor(CopyrightProfile value) {
                    return value.getName();
                  }
                })
                .showUnderneathOf(myNorthPanel);
            }
          }
          else {
            Messages.showWarningDialog(myProject,
                                       CopyrightBundle.message("dialog.message.the.selected.file.copyright.settings"),
                                       CopyrightBundle.message("dialog.title.import.failure"));
          }
        });
      }

      private void importProfile(CopyrightProfile copyrightProfile) {
        final String profileName = askForProfileName(CopyrightBundle.message("import.copyright.profile"), copyrightProfile.getName());
        if (profileName == null) return;
        copyrightProfile.setName(profileName);
        addProfileNode(copyrightProfile, true);
        Messages.showInfoMessage(myProject,
                                 CopyrightBundle.message("dialog.message.the.copyright.settings.imported"),
                                 CopyrightBundle.message("dialog.title.import.complete"));
      }
    });
    return result;
  }
@Override
  protected @NotNull ArrayList<AnAction> createActions(boolean fromPopup)