List of usage examples for com.intellij.openapi.actionSystem IdeActions GROUP_NAVBAR_POPUP
String GROUP_NAVBAR_POPUP
To view the source code for com.intellij.openapi.actionSystem IdeActions GROUP_NAVBAR_POPUP.
Click Source Link
From source file:com.intellij.ide.navigationToolbar.NavBarPanel.java
License:Apache License
public NavBarPanel(@NotNull Project project, boolean docked) { super(new FlowLayout(FlowLayout.LEFT, 0, 0)); myProject = project;// www.j a va 2 s .com myModel = createModel(); myIdeView = new NavBarIdeView(this); myPresentation = new NavBarPresentation(myProject); myUpdateQueue = new NavBarUpdateQueue(this); CustomizationUtil.installPopupHandler(this, IdeActions.GROUP_NAVBAR_POPUP, ActionPlaces.NAVIGATION_BAR_POPUP); setOpaque(false); if (!docked && UIUtil.isUnderDarcula()) { setBorder(new LineBorder(Gray._120, 1)); } myCopyPasteDelegator = new CopyPasteDelegator(myProject, NavBarPanel.this) { @Override @NotNull protected PsiElement[] getSelectedElements() { final PsiElement element = getSelectedElement(PsiElement.class); return element == null ? PsiElement.EMPTY_ARRAY : new PsiElement[] { element }; } }; myUpdateQueue.queueModelUpdateFromFocus(); myUpdateQueue.queueRebuildUi(); if (!docked) { final ActionCallback typeAheadDone = new ActionCallback(); IdeFocusManager.getInstance(project).typeAheadUntil(typeAheadDone); myUpdateQueue.queueTypeAheadDone(typeAheadDone); } Disposer.register(project, this); }
From source file:com.intellij.ide.navigationToolbar.NavBarPanel.java
License:Apache License
void rightClick(final int index) { final ActionManager actionManager = ActionManager.getInstance(); final ActionGroup group = (ActionGroup) CustomActionsSchema.getInstance() .getCorrectedAction(IdeActions.GROUP_NAVBAR_POPUP); final ActionPopupMenu popupMenu = actionManager.createActionPopupMenu(ActionPlaces.NAVIGATION_BAR_POPUP, group);/*w ww.ja v a 2 s . c o m*/ final NavBarItem item = getItem(index); if (item != null) { popupMenu.getComponent().show(this, item.getX(), item.getY() + item.getHeight()); } }
From source file:com.intellij.ide.ui.customization.CustomActionsSchema.java
License:Apache License
public CustomActionsSchema() { myIdToNameList.add(new Pair(IdeActions.GROUP_MAIN_MENU, ActionsTreeUtil.MAIN_MENU_TITLE)); myIdToNameList.add(new Pair(IdeActions.GROUP_MAIN_TOOLBAR, ActionsTreeUtil.MAIN_TOOLBAR)); myIdToNameList.add(new Pair(IdeActions.GROUP_EDITOR_POPUP, ActionsTreeUtil.EDITOR_POPUP)); myIdToNameList.add(new Pair(IdeActions.GROUP_EDITOR_GUTTER, "Editor Gutter Popup Menu")); myIdToNameList.add(new Pair(IdeActions.GROUP_EDITOR_TAB_POPUP, ActionsTreeUtil.EDITOR_TAB_POPUP)); myIdToNameList.add(new Pair(IdeActions.GROUP_PROJECT_VIEW_POPUP, ActionsTreeUtil.PROJECT_VIEW_POPUP)); myIdToNameList.add(new Pair(IdeActions.GROUP_SCOPE_VIEW_POPUP, "Scope View Popup Menu")); myIdToNameList.add(new Pair(IdeActions.GROUP_FAVORITES_VIEW_POPUP, ActionsTreeUtil.FAVORITES_POPUP)); myIdToNameList.add(new Pair(IdeActions.GROUP_COMMANDER_POPUP, ActionsTreeUtil.COMMANDER_POPUP)); myIdToNameList.add(new Pair(IdeActions.GROUP_J2EE_VIEW_POPUP, ActionsTreeUtil.J2EE_POPUP)); myIdToNameList.add(new Pair(IdeActions.GROUP_NAVBAR_POPUP, "Navigation Bar")); myIdToNameList.add(new Pair("NavBarToolBar", "Navigation Bar Toolbar")); CustomizableActionGroupProvider.CustomizableActionGroupRegistrar registrar = new CustomizableActionGroupProvider.CustomizableActionGroupRegistrar() { @Override/*w w w .j a v a2 s . c o m*/ public void addCustomizableActionGroup(@NotNull String groupId, @NotNull String groupTitle) { myIdToNameList.add(new Pair(groupId, groupTitle)); } }; for (CustomizableActionGroupProvider provider : CustomizableActionGroupProvider.EP_NAME.getExtensions()) { provider.registerGroups(registrar); } }