void () { ThreadingAssertions.assertEventDispatchThread(); myTree.setShowsRootHandles(true); SmartExpander.installOn(myTree); TreeUtil.installActions(myTree); EditSourceOnDoubleClickHandler.install(myTree, fusRunnable); EditSourceOnEnterKeyHandler.install(myTree, fusRunnable); TreeUtil.promiseSelectFirst(myTree); PopupHandler.installPopupMenu(myTree, IdeActions.GROUP_USAGE_VIEW_POPUP, ActionPlaces.USAGE_VIEW_POPUP); myTree.addTreeExpansionListener(new TreeExpansionListener() { @Override public void treeExpanded(TreeExpansionEvent event) { TreePath path = event.getPath(); Object component = path.getLastPathComponent(); if (component instanceof Node node) { if (!myExpandingCollapsing && node.needsUpdate()) { List<Node> toUpdate = new ArrayList<>(); checkNodeValidity(node, path, toUpdate); queueUpdateBulk(toUpdate, EmptyRunnable.getInstance()); } } } @Override public void treeCollapsed(TreeExpansionEvent event) { } }); TreeUIHelper.getInstance().installTreeSpeedSearch(myTree, o -> { Object value = o.getLastPathComponent(); TreeCellRenderer renderer = myTree.getCellRenderer(); if (renderer instanceof UsageViewTreeCellRenderer coloredRenderer) { return coloredRenderer.getPlainTextForNode(value); } return value == null ? null : value.toString(); }, true); }