当前位置: 首页>>代码示例>>Java>>正文


Java DefaultActionGroup.addAction方法代码示例

本文整理汇总了Java中com.intellij.openapi.actionSystem.DefaultActionGroup.addAction方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultActionGroup.addAction方法的具体用法?Java DefaultActionGroup.addAction怎么用?Java DefaultActionGroup.addAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.actionSystem.DefaultActionGroup的用法示例。


在下文中一共展示了DefaultActionGroup.addAction方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createActionToolbar

import com.intellij.openapi.actionSystem.DefaultActionGroup; //导入方法依赖的package包/类
public static ActionToolbar createActionToolbar(Tree componentsTree) {
    DefaultActionGroup defaultActionGroup = new DefaultActionGroup();
    defaultActionGroup.addAction(ActionManager.getInstance().getAction("Xray.Refresh"));
    defaultActionGroup.addAction(new CollapseAllAction(componentsTree));
    defaultActionGroup.addAction(new ExpandAllAction(componentsTree));
    return ActionManager.getInstance().createActionToolbar(ActionPlaces.CHANGES_VIEW_TOOLBAR, defaultActionGroup, true);
}
 
开发者ID:JFrogDev,项目名称:jfrog-idea-plugin,代码行数:8,代码来源:ComponentUtils.java

示例2: addActionsTo

import com.intellij.openapi.actionSystem.DefaultActionGroup; //导入方法依赖的package包/类
@Override
protected void addActionsTo(DefaultActionGroup group) {
  super.addActionsTo(group);
  ShowAllAffectedGenericAction showCommit = ShowAllAffectedGenericAction.getInstance();
  showCommit.registerCustomShortcutSet(new CustomShortcutSet(
    CommonShortcuts.DOUBLE_CLICK_1.getShortcuts()[0]), myTree);
  group.addAction(showCommit);

}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:GitSkippedCommits.java

示例3: createActions

import com.intellij.openapi.actionSystem.DefaultActionGroup; //导入方法依赖的package包/类
ActionGroup createActions(@Nullable DefaultActionGroup toInsert) {
  DefaultActionGroup popupGroup = new DefaultActionGroup(null, false);

  popupGroup.addAction(new GitNewBranchAction(myProject,Collections.singletonList(myRepository)));
  popupGroup.addAction(new CheckoutRevisionActions(myProject, myRepository));

  if (toInsert != null) {
    popupGroup.addAll(toInsert);
  }

  popupGroup.addSeparator("Local Branches");
  List<GitBranch> localBranches = new ArrayList<GitBranch>(myRepository.getBranches().getLocalBranches());
  Collections.sort(localBranches);
  for (GitBranch localBranch : localBranches) {
    if (!localBranch.equals(myRepository.getCurrentBranch())) { // don't show current branch in the list
      popupGroup.add(new LocalBranchActions(myProject, Collections.singletonList(myRepository), localBranch.getName(), myRepository));
    }
  }

  popupGroup.addSeparator("Remote Branches");
  List<GitBranch> remoteBranches = new ArrayList<GitBranch>(myRepository.getBranches().getRemoteBranches());
  Collections.sort(remoteBranches);
  for (GitBranch remoteBranch : remoteBranches) {
    popupGroup.add(new RemoteBranchActions(myProject, Collections.singletonList(myRepository), remoteBranch.getName(), myRepository));
  }
  
  return popupGroup;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:GitBranchPopupActions.java

示例4: createActions

import com.intellij.openapi.actionSystem.DefaultActionGroup; //导入方法依赖的package包/类
ActionGroup createActions(@Nullable DefaultActionGroup toInsert) {
  DefaultActionGroup popupGroup = new DefaultActionGroup(null, false);
  popupGroup.addAction(new HgNewBranchAction(myProject, Collections.singletonList(myRepository), myRepository));
  popupGroup.addAction(new HgNewBookmarkAction(Collections.singletonList(myRepository), myRepository));
  popupGroup.addAction(new HgBranchPopupActions.HgCloseBranchAction(Collections.singletonList(myRepository), myRepository));
  popupGroup.addAction(new HgShowUnnamedHeadsForCurrentBranchAction(myRepository));
  if (toInsert != null) {
    popupGroup.addAll(toInsert);
  }

  popupGroup.addSeparator("Bookmarks");
  List<String> bookmarkNames = getSortedNamesWithoutHashes(myRepository.getBookmarks());
  String currentBookmark = myRepository.getCurrentBookmark();
  for (String bookmark : bookmarkNames) {
    AnAction bookmarkAction = new BookmarkActions(myProject, Collections.singletonList(myRepository), bookmark);
    if (bookmark.equals(currentBookmark)) {
      bookmarkAction.getTemplatePresentation().setIcon(PlatformIcons.CHECK_ICON);
    }
    popupGroup.add(bookmarkAction);
  }

  popupGroup.addSeparator("Branches");
  List<String> branchNamesList = new ArrayList<String>(myRepository.getOpenedBranches());//only opened branches have to be shown
  Collections.sort(branchNamesList);
  for (String branch : branchNamesList) {
    if (!branch.equals(myRepository.getCurrentBranch())) { // don't show current branch in the list
      popupGroup.add(new HgCommonBranchActions(myProject, Collections.singletonList(myRepository), branch));
    }
  }
  return popupGroup;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:32,代码来源:HgBranchPopupActions.java


注:本文中的com.intellij.openapi.actionSystem.DefaultActionGroup.addAction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。