boolean (@NotNull DefaultMutableTreeNode root, @Nullable Runnable runAfterUpdate, boolean updateStructure) { Object element = getElementFor(root); boolean alwaysLeaf = element != null && getTreeStructure().isAlwaysLeaf(element); TreeUpdatePass updatePass; if (alwaysLeaf) { removeFromUnbuilt(root); removeLoading(root, true); updatePass = new TreeUpdatePass(root).setUpdateChildren(false); } else { updatePass = new TreeUpdatePass(root).setUpdateStructure(updateStructure).setUpdateStamp(-1); } AbstractTreeUpdater updater = getUpdater(); updater.runAfterUpdate(runAfterUpdate); updater.addSubtreeToUpdate(updatePass); return !alwaysLeaf; }