void (TreeModelEvent e) { TreePath parentPath = e.getTreePath(); if (parentPath == null || parentPath.getPathCount() > 2) return; Object[] children = e.getChildren(); for (Object o : children) { NodeDescriptor descriptor = TreeUtil.getUserObject(NodeDescriptor.class, o); if (descriptor != null && myBuilder.isAutoExpandNode(descriptor)) { ApplicationManager.getApplication().invokeLater(() -> { if (myTree.isVisible(parentPath) && myTree.isExpanded(parentPath)) { myTree.expandPath(parentPath.pathByAddingChild(o)); } }, myBuilder.myProject.getDisposed()); } } }