void (@NotNull TreePath path, boolean canSmartExpand) { processInnerChange(new TreeRunnable("AbstractTreeUi.expandPath") { @Override public void perform() { if (path.getLastPathComponent() instanceof DefaultMutableTreeNode node) { if (node.getChildCount() > 0 && !myTree.isExpanded(path)) { if (!canSmartExpand) { myNotForSmartExpand.add(node); } try { myRequestedExpand = path; myTree.expandPath(path); processSmartExpand(node, canSmartExpand, false); } finally { myNotForSmartExpand.remove(node); myRequestedExpand = null; } } else { processNodeActionsIfReady(node); } } } }); }