Java 类com.intellij.openapi.actionSystem.Anchor 实例源码

项目:consulo-java    文件:JavaDebugProcess.java   
@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);
}
项目:intellij-ce-playground    文件:AcceptWordAsCorrect.java   
@NotNull
public Anchor getPopupActionAnchor() {
  return Anchor.LAST;
}
项目:intellij-ce-playground    文件:SpellCheckerQuickFix.java   
@NotNull
Anchor getPopupActionAnchor();
项目:intellij-ce-playground    文件:ChangeTo.java   
@NotNull
public Anchor getPopupActionAnchor() {
  return Anchor.FIRST;
}
项目:google-cloud-intellij    文件:CloudDebugProcess.java   
@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));
}
项目:tools-idea    文件:AcceptWordAsCorrect.java   
@NotNull
public Anchor getPopupActionAnchor() {
  return Anchor.LAST;
}
项目:tools-idea    文件:SpellCheckerQuickFix.java   
@NotNull
Anchor getPopupActionAnchor();
项目:tools-idea    文件:ChangeTo.java   
@NotNull
public Anchor getPopupActionAnchor() {
  return Anchor.FIRST;
}
项目:spoofax-intellij    文件:DefaultIdeaLanguageManager.java   
/**
 * 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);
}