@NotNull
  private List<Object> getSelectedElements() {
    final TreePath[] selectionPaths = myTree.getSelectionPaths();
    if (selectionPaths == null) {
      return Collections.emptyList();
    }

    List<Object> elements = new ArrayList<>();
    for (TreePath selectionPath : selectionPaths) {
      final Object pathElement = getPathElement(selectionPath);
      if (pathElement != null) {
        elements.add(pathElement);
      }
    }
    return elements;
  }
@NotNull
  private List<Object> getSelectedElements()