boolean (RunnerAndConfigurationSettings settings, ExecutionTarget target, boolean isDumb) { if (isDumb && !settings.getType().isDumbAware()) return false; String executorId = getExecutor().getId(); RunConfiguration configuration = settings.getConfiguration(); Project project = configuration.getProject(); if (configuration instanceof CompoundRunConfiguration) { if (ExecutionTargetManager.getInstance(project).getTargetsFor(configuration).isEmpty()) return false; List<SettingsAndEffectiveTarget> subConfigurations = ((CompoundRunConfiguration)configuration).getConfigurationsWithEffectiveRunTargets(); if (subConfigurations.isEmpty()) return false; RunManager runManager = RunManager.getInstance(project); for (SettingsAndEffectiveTarget subConfiguration : subConfigurations) { RunnerAndConfigurationSettings subSettings = runManager.findSettings(subConfiguration.getConfiguration()); if (subSettings == null || !canRun(subSettings, subConfiguration.getTarget(), isDumb)) { return false; } } return true; } if (!isValid(settings)) return false; ProgramRunner<?> runner = ProgramRunner.getRunner(executorId, configuration); if (runner == null) return false; if (target == null) { target = ExecutionTargetManager.getInstance(project).findTarget(configuration); if (target == null) return false; } else if (!ExecutionTargetManager.canRun(configuration, target)) { return false; } return !ExecutionManager.getInstance(project).isStarting(executorId, runner.getRunnerId()); }