public @Nullable PackageDependenciesNode getSelectedNode() {
      TreePath[] paths = getSelectionPaths();
      if (paths == null || paths.length != 1) return null;
      final Object lastPathComponent = paths[0].getLastPathComponent();
      if (lastPathComponent instanceof PackageDependenciesNode) {
        return (PackageDependenciesNode)lastPathComponent;
      }
      return (PackageDependenciesNode)((DefaultMutableTreeNode)lastPathComponent).getUserObject();
    }
public @Nullable PackageDependenciesNode getSelectedNode()