Collection<AnAction> () { List<AnAction> actions = new ArrayList<>(); if (mySchemesPanel.supportsProjectSchemes()) { actions.add(new CopyToProjectAction()); actions.add(new CopyToIDEAction()); actions.add(new Separator()); } actions.add(new CopyAction()); actions.add(new RenameAction()); addAdditionalActions(actions); actions.add(new ResetAction()); actions.add(new DeleteAction()); @NotNull Collection<String> schemeImportersNames = getSchemeImportersNames(); @NotNull Collection<String> schemeExporterNames = getSchemeExporterNames(); if (!schemeExporterNames.isEmpty()) { actions.add(createImportExportAction(ApplicationBundle.message("settings.editor.scheme.export"), schemeExporterNames, ExportAction::new)); } actions.add(new Separator()); if (!schemeImportersNames.isEmpty()) { actions.add(createImportExportAction(ApplicationBundle.message("settings.editor.scheme.import", mySchemesPanel.getSchemeTypeName()), schemeImportersNames, ImportAction::new)); } return actions; }