ActionGroup (boolean isRightTree) { DefaultActionGroup group = new DefaultActionGroup(); final ActionManager actionManager = ActionManager.getInstance(); group.add(actionManager.getAction(IdeActions.ACTION_EDIT_SOURCE)); group.add(actionManager.getAction(IdeActions.GROUP_VERSION_CONTROLS)); if (isRightTree) { group.add(actionManager.getAction(IdeActions.GROUP_ANALYZE)); group.add(new AddToScopeAction()); group.add(new SelectInLeftTreeAction()); group.add(new ShowDetailedInformationAction()); } else { group.add(new RemoveFromScopeAction()); } return group; }