@Override public void registerAdditionalActions(@NotNull DefaultActionGroup leftToolbar, @NotNull DefaultActionGroup topToolbar, @NotNull DefaultActionGroup settings) { Constraints beforeRunner = new Constraints(Anchor.BEFORE, "Runner.Layout"); leftToolbar.add(AnSeparator.getInstance(), beforeRunner); leftToolbar.add(ActionManager.getInstance().getAction(DebuggerActions.DUMP_THREADS), beforeRunner); leftToolbar.add(AnSeparator.getInstance(), beforeRunner); Constraints beforeSort = new Constraints(Anchor.BEFORE, "XDebugger.ToggleSortValues"); settings.addAction(new WatchLastMethodReturnValueAction(), beforeSort); settings.addAction(new AutoVarsSwitchAction(), beforeSort); }
@NotNull public Anchor getPopupActionAnchor() { return Anchor.LAST; }
@NotNull Anchor getPopupActionAnchor();
@NotNull public Anchor getPopupActionAnchor() { return Anchor.FIRST; }
@Override public void registerAdditionalActions( @NotNull DefaultActionGroup leftToolbar, @NotNull DefaultActionGroup topToolbar, @NotNull DefaultActionGroup settings) { ActionManager manager = ActionManager.getInstance(); leftToolbar.add( new SaveAndExitAction(), new Constraints(Anchor.AFTER, IdeActions.ACTION_STOP_PROGRAM)); leftToolbar.remove(manager.getAction(IdeActions.ACTION_RERUN)); leftToolbar.remove(manager.getAction(IdeActions.ACTION_STOP_PROGRAM)); // XDebugSessionTab puts this action second from end. AnAction[] actions = leftToolbar.getChildActionsOrStubs(); for (AnAction action : actions) { String text = action.getTemplatePresentation().getText(); if (ExecutionBundle.message("close.tab.action.name").equals(text)) { leftToolbar.remove(action); break; } } // remove help button since it points to the IntelliJ help by default and we don't have // a help page yet. // for some reason, the help button's key in leftToolbar is null, so we need to remove it // by class name. // https://github.com/GoogleCloudPlatform/gcloud-intellij/issues/149 for (AnAction child : leftToolbar.getChildActionsOrStubs()) { if (child .getClass() .getCanonicalName() .equalsIgnoreCase("com.intellij.ide.actions.ContextHelpAction")) { // we never want to show IDEA's help. leftToolbar.remove(child); // show our help if we have it. String helpUrl = GctBundle.getString("clouddebug.helpurl"); if (!"".equals(helpUrl)) { leftToolbar.add(new CloudDebugHelpAction(helpUrl)); } break; } } leftToolbar.remove(manager.getAction(XDebuggerActions.RESUME)); leftToolbar.remove(manager.getAction(XDebuggerActions.PAUSE)); leftToolbar.remove(manager.getAction(XDebuggerActions.MUTE_BREAKPOINTS)); topToolbar.remove(manager.getAction(XDebuggerActions.STEP_OVER)); topToolbar.remove(manager.getAction(XDebuggerActions.STEP_INTO)); topToolbar.remove(manager.getAction(XDebuggerActions.FORCE_STEP_INTO)); topToolbar.remove(manager.getAction(XDebuggerActions.STEP_OUT)); topToolbar.remove(manager.getAction(XDebuggerActions.RUN_TO_CURSOR)); topToolbar.remove(manager.getAction(XDebuggerActions.EVALUATE_EXPRESSION)); topToolbar.remove(manager.getAction(DebuggerActions.POP_FRAME)); }
/** * Activates the specified language. * * @param languageImplBindings * The bindings of the language implementation to activate. */ private void activateLanguageImpl(final LanguageImplBindings languageImplBindings) { this.actionUtils.addAndRegisterActionGroup(languageImplBindings.getBuildActionGroup(), IdeActions.GROUP_MAIN_MENU, "ToolsMenu", Anchor.AFTER); }