private @Nullable Pair<List<HandlerItem>, HandlerItem> getItemsList(Project project,
                                                                      List<? extends RunContentDescriptor> descriptors,
                                                                      RunContentDescriptor toSelect) {
    if (descriptors.isEmpty()) {
      return null;
    }

    List<HandlerItem> items = new ArrayList<>(descriptors.size());
    HandlerItem selected = null;
    for (final RunContentDescriptor descriptor : descriptors) {
      final ProcessHandler handler = descriptor.getProcessHandler();
      if (handler != null) {
        HandlerItem item = new HandlerItem(getDisplayName(project, descriptor), descriptor.getIcon(), false) {
          @Override
          void stop() {
            ExecutionManagerImpl.stopProcess(descriptor);
          }
        };
        items.add(item);
        if (descriptor == toSelect) {
          selected = item;
        }
      }
    }

    return Pair.create(items, selected);
  }
private @Nullable Pair<List<HandlerItem>, HandlerItem> getItemsList(Project project,
                                                                      List<? extends RunContentDescriptor> descriptors,
                                                                      RunContentDescriptor toSelect)