private @NotNull List<AbstractTreeNode<?>> getSelectedNodes() {
    if (myBuilder == null) return Collections.emptyList();
    final int[] indices = myList.getSelectedIndices();
    ArrayList<AbstractTreeNode<?>> result = new ArrayList<>();
    for (int index : indices) {
      if (index >= myModel.getSize()) continue;
      Object elementAtIndex = myModel.getElementAt(index);
      AbstractTreeNode<?> node = elementAtIndex instanceof AbstractTreeNode ? (AbstractTreeNode<?>)elementAtIndex : null;
      if (node != null) {
        result.add(node);
      }
    }
    return result;
  }
private @NotNull List<AbstractTreeNode<?>> getSelectedNodes()