public static @NotNull SelectionInfo create(final AbstractProjectViewPane viewPane) {
      if (viewPane == null) {
        return new SelectionInfo(ArrayUtilRt.EMPTY_OBJECT_ARRAY);
      }

      List<Object> selectedElements = Collections.emptyList();
      TreePath[] selectionPaths = viewPane.getSelectionPaths();
      if (selectionPaths != null) {
        selectedElements = new ArrayList<>();
        for (TreePath path : selectionPaths) {
          NodeDescriptor<?> descriptor = TreeUtil.getLastUserObject(NodeDescriptor.class, path);
          if (descriptor != null) {
            Object element = descriptor.getElement();
            if (element != null) {
              selectedElements.add(element);
            }
          }
        }
      }
      return new SelectionInfo(selectedElements.toArray());
    }
public static @NotNull SelectionInfo create(final AbstractProjectViewPane viewPane)