public RadComponent @NotNull [] getSelectedComponents() {
    final TreePath[] paths = getSelectionPaths();
    if (paths == null) {
      return RadComponent.EMPTY_ARRAY;
    }
    final ArrayList<RadComponent> result = new ArrayList<>(paths.length);
    for (TreePath path : paths) {
      final DefaultMutableTreeNode node = (DefaultMutableTreeNode)path.getLastPathComponent();
      if (node != null && node.getUserObject() instanceof ComponentPtrDescriptor descriptor) {
        final ComponentPtr ptr = descriptor.getElement();
        if (ptr != null && ptr.isValid()) {
          result.add(ptr.getComponent());
        }
      }
    }
    return result.toArray(RadComponent.EMPTY_ARRAY);
  }
public RadComponent @NotNull [] getSelectedComponents()