void (@Nullable RunnerAndConfigurationSettings selected) { if (myRunAction == null) return; Executor executor = null; if (selected != null) { executor = ExecutionManagerImpl.getInstance(myProject).getRecentExecutor(selected); } if (executor == null) { executor = ExecutorRegistry.getInstance().getExecutorById(DefaultRunExecutor.EXECUTOR_ID); if (executor != null && selected != null && !canRun(selected, executor)) { executor = ExecutorRegistry.getInstance().getExecutorById(ToolWindowId.DEBUG); if (executor != null && !canRun(selected, executor)) { executor = null; } } } updateRunButton(executor, selected); }