Example usage for com.intellij.openapi.actionSystem IdeActions ACTION_CALL_HIERARCHY

List of usage examples for com.intellij.openapi.actionSystem IdeActions ACTION_CALL_HIERARCHY

Introduction

In this page you can find the example usage for com.intellij.openapi.actionSystem IdeActions ACTION_CALL_HIERARCHY.

Prototype

String ACTION_CALL_HIERARCHY

To view the source code for com.intellij.openapi.actionSystem IdeActions ACTION_CALL_HIERARCHY.

Click Source Link

Usage

From source file:com.google.cloud.tools.intellij.debugger.CloudDebugProcessTest.java

License:Apache License

@Test
public void testRegisterAdditionalActions_close() {
    ActionManager manager = ActionManager.getInstance();
    AnAction action0 = manager.getAction(IdeActions.ACTION_PIN_ACTIVE_TAB);
    AnAction action1 = manager.getAction(IdeActions.ACTION_CLOSE);
    action1.getTemplatePresentation().setText("Close");
    AnAction action2 = manager.getAction(IdeActions.ACTION_CONTEXT_HELP);
    AnAction action3 = manager.getAction(IdeActions.ACTION_CALL_HIERARCHY);
    List<AnAction> leftToolbarActions = Lists.newArrayList();
    leftToolbarActions.add(action0);//  w w w  .  ja  v a 2 s  .c  o  m
    leftToolbarActions.add(action1);
    leftToolbarActions.add(action2);
    leftToolbarActions.add(action3);
    DefaultActionGroup leftToolbar = new DefaultActionGroup(leftToolbarActions);
    List<AnAction> actions = Lists.newArrayList();
    DefaultActionGroup topToolbar = new DefaultActionGroup(actions);
    DefaultActionGroup settings = new DefaultActionGroup(actions);

    process.registerAdditionalActions(leftToolbar, topToolbar, settings);

    assertEquals(4, leftToolbar.getChildrenCount());
    assertEquals(action0, leftToolbar.getChildActionsOrStubs()[0]);
    assertEquals(action3, leftToolbar.getChildActionsOrStubs()[1]);
}

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:org.cordovastudio.startup.CordovaStudioInitializer.java

License:Apache License

private void hideIdeaActions() {
    hideAction("NewPackageInfo", "package-info.java");

    hideAction("NewForm", "GUI Form");
    hideAction("NewDialog", "Dialog");
    hideAction("NewFormSnapshot", "Form Snapshot");
    replaceAction("Groovy.NewClass", new EmptyAction());
    replaceAction("Groovy.NewScript", new EmptyAction());
    hideAction("NewModule", "New Module...");
    hideAction("NewModuleInGroup", "Module");
    hideAction("CreateLibraryFromFile", "Add As Library...");
    hideAction("ImportModule", "Import Module...");
    //hideAction(IdeActions.GROUP_MOVE_MODULE_TO_GROUP, "Move Module to Group");
    hideAction(IdeActions.MODULE_SETTINGS, "Module Settings");

    //hideAction(IdeActions.GROUP_WELCOME_SCREEN_DOC, "Docs and How-Tos");
    //hideAction(IdeActions.GROUP_WELCOME_SCREEN_QUICKSTART, "WelcomeScreen.QuickStart"); //TODO: find name
    hideAction(IdeActions.ACTION_EXTERNAL_JAVADOC, "External Documentation");
    hideAction(IdeActions.ACTION_QUICK_JAVADOC, "Quick Documentation");

    hideAction("AddFrameworkSupport", "Add Framework Support...");

    hideAction(IdeActions.ACTION_GENERATE_ANT_BUILD, "Generate Ant Build...");
    hideAction("BuildArtifact", "Build Artifacts...");
    hideAction("RunTargetAction", "Run Ant Target");
    hideAction(IdeActions.ACTION_MAKE_MODULE, "Make Module");
    hideAction(IdeActions.ACTION_GENERATE_ANT_BUILD, "Generate Ant Build...");
    hideAction(IdeActions.ACTION_INSPECT_CODE, "Inspect Code...");
    //hideAction(IdeActions.GROUP_DEBUGGER, "DebuggerActions"); //TODO: find name
    hideAction(IdeActions.ACTION_DEFAULT_DEBUGGER, "Debug");
    hideAction(IdeActions.ACTION_TOGGLE_LINE_BREAKPOINT, "Toggle Line Breakpoint");
    //hideAction(IdeActions.GROUP_USAGE_VIEW_POPUP, "UsageView.Popup"); //TODO: find name
    hideAction(IdeActions.ACTION_GOTO_DECLARATION, "Declaration");
    hideAction(IdeActions.ACTION_GOTO_TYPE_DECLARATION, "Type Declaration");
    hideAction(IdeActions.ACTION_GOTO_IMPLEMENTATION, "Implementation(s)");

    hideAction(IdeActions.ACTION_ANALYZE_DEPENDENCIES, "Analyze Dependencies...");
    hideAction(IdeActions.ACTION_ANALYZE_BACK_DEPENDENCIES, "Analyze Backward Dependencies...");
    hideAction(IdeActions.ACTION_ANALYZE_CYCLIC_DEPENDENCIES, "Analyze Cyclic Dependencies...");

    //hideAction(IdeActions.GROUP_REFACTOR, "Refactor");

    hideAction(IdeActions.ACTION_TYPE_HIERARCHY, "Class Hierarchy");
    hideAction(IdeActions.ACTION_METHOD_HIERARCHY, "Method Hierarchy");
    hideAction(IdeActions.ACTION_CALL_HIERARCHY, "Call Hierarchy");
    //hideAction(IdeActions.GROUP_TYPE_HIERARCHY_POPUP, "TypeH ierarchy");
    //hideAction(IdeActions.GROUP_METHOD_HIERARCHY_POPUP, "Method Hierarchy");
    //hideAction(IdeActions.GROUP_CALL_HIERARCHY_POPUP, "Call Hierarchy");

    //hideAction(IdeActions.GROUP_COMMANDER_POPUP, "Commander");

    //hideAction(IdeActions.GROUP_TESTTREE_POPUP, "TestTreePopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_TESTSTATISTICS_POPUP, "TestStatisticsTablePopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_J2EE_VIEW_POPUP, "J2EEViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_EJB_TRANSACTION_ATTRIBUTES_VIEW_POPUP, "EjbTransactionAttributesViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_EJB_ENVIRONMENT_ENTRIES_VIEW_POPUP, "EjbEnvironmentEntriesViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_EJB_REFERENCES_VIEW_POPUP, "EjbReferencesViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_SECURITY_ROLES_VIEW_POPUP, "SecurityRolesViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_PARAMETERS_VIEW_POPUP, "ParametersViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_SERVLET_MAPPING_VIEW_POPUP, "ServletMappingViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_EJB_RESOURCE_REFERENCES_VIEW_POPUP, "EjbResourceReferencesViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_EJB_RESOURCE_ENVIRONMENT_REFERENCES_VIEW_POPUP, "EjbResourceEnvironmentReferencesViewPopupMenu"); //TODO: find name
    //hideAction(IdeActions.GROUP_ADD_SUPPORT, "AddSupportGroup");

    hideAction(IdeActions.ACTION_QUICK_IMPLEMENTATIONS, "Quick Definition");
}

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);
}