@Nullable RefEntity getCommonSelectedElement() {
    final TreePath[] paths = getSelectionPaths();
    final TreePath ancestor = TreePathUtil.findCommonAncestor(paths);
    if (ancestor == null) return null;
    final Object node = ancestor.getLastPathComponent();
    return node instanceof RefElementNode ? ((RefElementNode)node).getElement() : null;
  }
@Nullable RefEntity getCommonSelectedElement()