JPopupMenu (boolean toolWindow) { ActionManager actionManager = ActionManager.getInstance(); DefaultActionGroup group = new DefaultActionGroup(); DefaultActionGroup newGroup = DefaultActionGroup.createPopupGroup(ActionsBundle.messagePointer("group.NewGroup.text")); final RepositoryBrowserComponent browser = getRepositoryBrowser(); newGroup.add(new AddLocationAction(browser)); newGroup.add(new MkDirAction(browser)); group.add(newGroup); group.addSeparator(); if (toolWindow) { group.add(actionManager.getAction(IdeActions.ACTION_EDIT_SOURCE)); group.add(new HistoryAction()); } group.add(new CheckoutAction()); group.add(new DiffAction()); group.add(new BrowseCommittedChangesAction()); group.addSeparator(); group.add(new ImportAction()); group.add(new ExportAction()); group.addSeparator(); group.add(new CopyOrMoveAction(false)); group.add(new CopyOrMoveAction(true)); group.add(myDeleteAction); group.add(copyUrlAction); group.addSeparator(); group.add(new RefreshAction(browser)); group.add(new EditLocationAction(browser)); group.add(new DiscardLocationAction(browser)); ActionPopupMenu menu = actionManager.createActionPopupMenu(PLACE_MENU, group); return menu.getComponent(); }