ExecutionTarget (RunConfiguration configuration) { ExecutionTarget target = getActiveTarget(); if (canRun(configuration, target)) { return target; } List<ExecutionTarget> targets = getTargetsFor(configuration); return ContainerUtil.getFirstItem(targets); }