List of usage examples for com.intellij.openapi.actionSystem ActionPlaces NAVIGATION_BAR_POPUP
String NAVIGATION_BAR_POPUP
To view the source code for com.intellij.openapi.actionSystem ActionPlaces NAVIGATION_BAR_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;/*from w w w . j a v a2 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);//from w w w . j a v a 2s. c o m final NavBarItem item = getItem(index); if (item != null) { popupMenu.getComponent().show(this, item.getX(), item.getY() + item.getHeight()); } }