void (Tree tree) { tree.setCellRenderer(new MyTreeCellRenderer()); tree.setRootVisible(false); tree.setShowsRootHandles(true); TreeUtil.installActions(tree); SmartExpander.installOn(tree); TreeUIHelper.getInstance().installTreeSpeedSearch(tree); tree.addTreeWillExpandListener(new TreeWillExpandListener() { @Override public void treeWillExpand(TreeExpansionEvent event) { ((PackageDependenciesNode)event.getPath().getLastPathComponent()).updateAndSortChildren(); } @Override public void treeWillCollapse(TreeExpansionEvent event) { } }); PopupHandler.installPopupMenu(tree, createTreePopupActions(), "ScopeEditorPopup"); }