void () { ((DefaultTreeModel)myTree.getModel()).setRoot(myRoot); myTree.setRootVisible(false); myTree.setShowsRootHandles(true); TreeUtil.installActions(myTree); myTree.setCellRenderer(new MyColoredTreeCellRenderer()); List<AnAction> actions = createActions(true); if (actions != null) { final DefaultActionGroup group = new DefaultActionGroup(); for (AnAction action : actions) { group.add(action); } actions = getAdditionalActions(); if (actions != null) { group.addSeparator(); for (AnAction action : actions) { group.add(action); } } PopupHandler.installPopupMenu(myTree, group, "MasterDetailsTreePopup"); } }