Example usage for com.intellij.openapi.actionSystem ActionPlaces CALL_HIERARCHY_VIEW_POPUP

List of usage examples for com.intellij.openapi.actionSystem ActionPlaces CALL_HIERARCHY_VIEW_POPUP

Introduction

In this page you can find the example usage for com.intellij.openapi.actionSystem ActionPlaces CALL_HIERARCHY_VIEW_POPUP.

Prototype

String CALL_HIERARCHY_VIEW_POPUP

To view the source code for com.intellij.openapi.actionSystem ActionPlaces CALL_HIERARCHY_VIEW_POPUP.

Click Source Link

Usage

From source file:com.intellij.ide.hierarchy.call.CallHierarchyBrowser.java

License:Apache License

@Override
protected void createTrees(@NotNull final Map<String, JTree> type2TreeMap) {
    ActionGroup group = (ActionGroup) ActionManager.getInstance()
            .getAction(IdeActions.GROUP_CALL_HIERARCHY_POPUP);
    final JTree tree1 = createTree(false);
    PopupHandler.installPopupHandler(tree1, group, ActionPlaces.CALL_HIERARCHY_VIEW_POPUP,
            ActionManager.getInstance());
    final BaseOnThisMethodAction baseOnThisMethodAction = new BaseOnThisMethodAction();
    baseOnThisMethodAction.registerCustomShortcutSet(
            ActionManager.getInstance().getAction(IdeActions.ACTION_CALL_HIERARCHY).getShortcutSet(), tree1);
    type2TreeMap.put(CALLEE_TYPE, tree1);

    final JTree tree2 = createTree(false);
    PopupHandler.installPopupHandler(tree2, group, ActionPlaces.CALL_HIERARCHY_VIEW_POPUP,
            ActionManager.getInstance());
    baseOnThisMethodAction.registerCustomShortcutSet(
            ActionManager.getInstance().getAction(IdeActions.ACTION_CALL_HIERARCHY).getShortcutSet(), tree2);
    type2TreeMap.put(CALLER_TYPE, tree2);
}

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 w w  . j  a  v a 2 s  .  c o m*/
    return false;
}

From source file:org.jetbrains.jet.plugin.hierarchy.calls.KotlinCallHierarchyBrowser.java

License:Apache License

@Override
protected void createTrees(@NotNull Map<String, JTree> type2TreeMap) {
    ActionGroup group = (ActionGroup) ActionManager.getInstance()
            .getAction(IdeActions.GROUP_CALL_HIERARCHY_POPUP);

    JTree tree1 = createTree(false);
    PopupHandler.installPopupHandler(tree1, group, ActionPlaces.CALL_HIERARCHY_VIEW_POPUP,
            ActionManager.getInstance());
    BaseOnThisMethodAction baseOnThisMethodAction = new BaseOnThisMethodAction();
    baseOnThisMethodAction.registerCustomShortcutSet(
            ActionManager.getInstance().getAction(IdeActions.ACTION_CALL_HIERARCHY).getShortcutSet(), tree1);
    type2TreeMap.put(CALLEE_TYPE, tree1);

    JTree tree2 = createTree(false);
    PopupHandler.installPopupHandler(tree2, group, ActionPlaces.CALL_HIERARCHY_VIEW_POPUP,
            ActionManager.getInstance());
    baseOnThisMethodAction.registerCustomShortcutSet(
            ActionManager.getInstance().getAction(IdeActions.ACTION_CALL_HIERARCHY).getShortcutSet(), tree2);
    type2TreeMap.put(CALLER_TYPE, tree2);
}