boolean (@NotNull DefaultMutableTreeNode parent) { TreePath path = new TreePath(myTreeModel.getPathToRoot(parent)); TreePath[] paths = myTree.getSelectionPaths(); if (paths == null) return false; for (TreePath path1 : paths) { if (path.isDescendant(path1)) return true; } return false; }