HierarchyNodeDescriptor (@NotNull DefaultMutableTreeNode node) { Object userObject = node.getUserObject(); if (userObject instanceof HierarchyNodeDescriptor) { return (HierarchyNodeDescriptor)userObject; } return null; }