private static void addActionsForSelected(@NotNull RunnerAndConfigurationSettings selectedConfiguration,
                                            @NotNull Project project,
                                            @NotNull List<ItemWrapper<?>> result) {
    boolean isFirst = true;
    final ExecutionTarget activeTarget = ExecutionTargetManager.getActiveTarget(project);
    for (ExecutionTarget eachTarget : ExecutionTargetManager.getTargetsToChooseFor(project, selectedConfiguration.getConfiguration())) {
      ItemWrapper<ExecutionTarget> itemWrapper = new ItemWrapper<>(eachTarget, isFirst) {
        @Override
        public Icon getIcon() {
          return getValue().getIcon();
        }

        @Override
        public String getText() {
          return getValue().getDisplayName();
        }

        @Override
        public void perform(final @NotNull Project project, final @NotNull Executor executor, @NotNull DataContext context) {
          ExecutionTargetManager.setActiveTarget(project, getValue());
          ExecutionUtil.doRunConfiguration(selectedConfiguration, executor, null, null, context);
        }

        @Override
        public boolean available(Executor executor) {
          return true;
        }
      };
      itemWrapper.setChecked(eachTarget.equals(activeTarget));
      result.add(itemWrapper);
      isFirst = false;
    }
  }
private static void addActionsForSelected(@NotNull RunnerAndConfigurationSettings selectedConfiguration,
                                            @NotNull Project project,
                                            @NotNull List<ItemWrapper<?>> result)