public final HierarchyNodeDescriptor @NotNull [] getSelectedDescriptors() {
    JTree tree = getCurrentTree();
    if (tree == null) {
      return HierarchyNodeDescriptor.EMPTY_ARRAY;
    }
    TreePath[] paths = tree.getSelectionPaths();
    if (paths == null || paths.length == 0) {
      return HierarchyNodeDescriptor.EMPTY_ARRAY;
    }
    ArrayList<HierarchyNodeDescriptor> list = new ArrayList<>(paths.length);
    for (TreePath path : paths) {
      Object lastPathComponent = path.getLastPathComponent();
      if (lastPathComponent instanceof DefaultMutableTreeNode node) {
        HierarchyNodeDescriptor descriptor = getDescriptor(node);
        if (descriptor != null) {
          list.add(descriptor);
        }
      }
    }
    return list.toArray(HierarchyNodeDescriptor.EMPTY_ARRAY);
  }
public final HierarchyNodeDescriptor @NotNull [] getSelectedDescriptors()