List of usage examples for com.intellij.openapi.actionSystem ActionPlaces TYPE_HIERARCHY_VIEW_POPUP
String TYPE_HIERARCHY_VIEW_POPUP
To view the source code for com.intellij.openapi.actionSystem ActionPlaces TYPE_HIERARCHY_VIEW_POPUP.
Click Source Link
From source file:com.intellij.ide.hierarchy.type.TypeHierarchyBrowser.java
License:Apache License
protected void createTrees(@NotNull Map<String, JTree> trees) { ActionGroup group = (ActionGroup) ActionManager.getInstance() .getAction(IdeActions.GROUP_TYPE_HIERARCHY_POPUP); final BaseOnThisTypeAction baseOnThisTypeAction = new BaseOnThisTypeAction(); final JTree tree1 = createTree(true); PopupHandler.installPopupHandler(tree1, group, ActionPlaces.TYPE_HIERARCHY_VIEW_POPUP, ActionManager.getInstance()); baseOnThisTypeAction.registerCustomShortcutSet( ActionManager.getInstance().getAction(IdeActions.ACTION_TYPE_HIERARCHY).getShortcutSet(), tree1); trees.put(TYPE_HIERARCHY_TYPE, tree1); final JTree tree2 = createTree(true); PopupHandler.installPopupHandler(tree2, group, ActionPlaces.TYPE_HIERARCHY_VIEW_POPUP, ActionManager.getInstance()); baseOnThisTypeAction.registerCustomShortcutSet( ActionManager.getInstance().getAction(IdeActions.ACTION_TYPE_HIERARCHY).getShortcutSet(), tree2); trees.put(SUPERTYPES_HIERARCHY_TYPE, tree2); final JTree tree3 = createTree(true); PopupHandler.installPopupHandler(tree3, group, ActionPlaces.TYPE_HIERARCHY_VIEW_POPUP, ActionManager.getInstance()); baseOnThisTypeAction.registerCustomShortcutSet( ActionManager.getInstance().getAction(IdeActions.ACTION_TYPE_HIERARCHY).getShortcutSet(), tree3); trees.put(SUBTYPES_HIERARCHY_TYPE, tree3); }
From source file:com.intellij.tools.BaseExternalToolsGroup.java
License:Apache License
private boolean isToolVisible(T tool, String context) { if (!tool.isEnabled()) return false; if (ActionPlaces.EDITOR_POPUP.equals(context) || ActionPlaces.EDITOR_TAB_POPUP.equals(context)) { return tool.isShownInEditor(); } else if (ActionPlaces.PROJECT_VIEW_POPUP.equals(context) || ActionPlaces.COMMANDER_POPUP.equals(context) || ActionPlaces.J2EE_VIEW_POPUP.equals(context) || ActionPlaces.TYPE_HIERARCHY_VIEW_POPUP.equals(context) || ActionPlaces.CALL_HIERARCHY_VIEW_POPUP.equals(context) || ActionPlaces.METHOD_HIERARCHY_VIEW_POPUP.equals(context) || ActionPlaces.FAVORITES_VIEW_POPUP.equals(context) || ActionPlaces.SCOPE_VIEW_POPUP.equals(context) || ActionPlaces.NAVIGATION_BAR.equals(context)) { return tool.isShownInProjectViews(); } else if (ActionPlaces.MAIN_MENU.equals(context)) { return tool.isShownInMainMenu(); } else if (ActionPlaces.USAGE_VIEW_POPUP.equals(context)) { return tool.isShownInSearchResultsPopup(); }/*from w ww .j a va 2 s . c om*/ return false; }