ItemWrapper (final @NotNull Project project, final @NotNull RunnerAndConfigurationSettings settings) { return new ItemWrapper<>(settings) { @Override public void perform(@NotNull Project project, @NotNull Executor executor, @NotNull DataContext context) { RunnerAndConfigurationSettings config = getValue(); final RunManager manager = RunManager.getInstance(project); if (!manager.isRiderRunWidgetActive()) RunManager.getInstance(project).setSelectedConfiguration(config); ExecutorRegistryImpl.RunnerHelper.run(project, settings.getConfiguration(), settings, context, executor); } @Override public ConfigurationType getType() { return getValue().getType(); } @Override public Icon getIcon() { return RunManagerEx.getInstanceEx(project).getConfigurationIcon(getValue(), true); } @Override public String getText() { return Executor.shortenNameIfNeeded(getValue().getName()) + getValue().getConfiguration().getPresentableType(); } @Override public boolean hasActions() { return true; } @Override public boolean available(@NotNull Executor executor) { RunnerAndConfigurationSettings value = getValue(); return value != null && ExecutorRegistryImpl.RunnerHelper.canRun(project, executor, settings.getConfiguration()); } @Override public PopupStep getNextStep(final @NotNull Project project, final @NotNull ChooseRunConfigurationPopup action) { return new ConfigurationActionsStep(project, action, getValue(), isDynamic()); } }; }