ItemWrapper<Void> () { ItemWrapper<Void> result = new ItemWrapper<>(null) { @Override public Icon getIcon() { return AllIcons.Actions.EditSource; } @Override public String getText() { return UIUtil.removeMnemonic(ActionsBundle.message("action.editRunConfigurations.text")); } @Override public void perform(final @NotNull Project project, final @NotNull Executor executor, @NotNull DataContext context) { if (new EditConfigurationsDialog(project) { @Override protected void init() { setOKButtonText(executor.getActionName()); myExecutor = executor; super.init(); } }.showAndGet()) { ApplicationManager.getApplication().invokeLater(() -> { RunnerAndConfigurationSettings configuration = RunManager.getInstance(project).getSelectedConfiguration(); if (configuration != null) { ExecutionUtil.doRunConfiguration(configuration, executor, null, null, context); } }, project.getDisposed()); } } @Override public boolean available(Executor executor) { return true; } }; result.setMnemonic(0); return result; }