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


Java DefaultActionGroup.addAll方法代码示例

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


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

示例1: createToolbar

import com.intellij.openapi.actionSystem.DefaultActionGroup; //导入方法依赖的package包/类
private ActionToolbarImpl createToolbar() {
  final DefaultActionGroup framesGroup = new DefaultActionGroup();

  CommonActionsManager actionsManager = CommonActionsManager.getInstance();
  framesGroup.add(actionsManager.createPrevOccurenceAction(getFramesList()));
  framesGroup.add(actionsManager.createNextOccurenceAction(getFramesList()));

  framesGroup.addAll(ActionManager.getInstance().getAction(XDebuggerActions.FRAMES_TOP_TOOLBAR_GROUP));

  final ActionToolbarImpl toolbar =
    (ActionToolbarImpl)ActionManager.getInstance().createActionToolbar(ActionPlaces.DEBUGGER_TOOLBAR, framesGroup, true);
  toolbar.setReservePlaceAutoPopupIcon(false);
  toolbar.setAddSeparatorFirst(true);
  toolbar.getComponent().setBorder(new EmptyBorder(1, 0, 0, 0));
  return toolbar;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:XFramesView.java

示例2: createTreePanel

import com.intellij.openapi.actionSystem.DefaultActionGroup; //导入方法依赖的package包/类
@NotNull static JPanel createTreePanel(@NotNull CheckboxTreeView tree) {
  JPanel treePanel = new JPanel(new BorderLayout());

  DefaultActionGroup group = new DefaultActionGroup();
  CommonActionsManager actions = CommonActionsManager.getInstance();
  group.addAll(actions.createExpandAllAction(tree, treePanel), actions.createCollapseAllAction(tree, treePanel));

  ActionToolbar actionToolBar = ActionManager.getInstance().createActionToolbar("", group, true);
  JPanel buttonsPanel = new JPanel(new BorderLayout());
  buttonsPanel.add(actionToolBar.getComponent(), BorderLayout.CENTER);
  buttonsPanel.setBorder(new SideBorder(JBColor.border(), SideBorder.TOP | SideBorder.LEFT | SideBorder.RIGHT, 1));

  treePanel.add(buttonsPanel, BorderLayout.NORTH);
  treePanel.add(ScrollPaneFactory.createScrollPane(tree), BorderLayout.CENTER);

  return treePanel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:ProjectProfileSelectionDialog.java

示例3: handlePopup

import com.intellij.openapi.actionSystem.DefaultActionGroup; //导入方法依赖的package包/类
private void handlePopup(final MouseEvent e) {
  if (e.getClickCount() != 1 || !e.isPopupTrigger()) return;

  if (e.getX() < 0 || e.getX() >= e.getComponent().getWidth() || e.getY() < 0 || e.getY() >= e.getComponent().getHeight()) return;

  String place = myTabs.getPopupPlace();
  place = place != null ? place : ActionPlaces.UNKNOWN;
  myTabs.myPopupInfo = myInfo;

  final DefaultActionGroup toShow = new DefaultActionGroup();
  if (myTabs.getPopupGroup() != null) {
    toShow.addAll(myTabs.getPopupGroup());
    toShow.addSeparator();
  }

  JBTabsImpl tabs =
    JBTabsImpl.NAVIGATION_ACTIONS_KEY.getData(DataManager.getInstance().getDataContext(e.getComponent(), e.getX(), e.getY()));
  if (tabs == myTabs && myTabs.myAddNavigationGroup) {
    toShow.addAll(myTabs.myNavigationActions);
  }

  if (toShow.getChildrenCount() == 0) return;

  myTabs.myActivePopup = myTabs.myActionManager.createActionPopupMenu(place, toShow).getComponent();
  myTabs.myActivePopup.addPopupMenuListener(myTabs.myPopupListener);

  myTabs.myActivePopup.addPopupMenuListener(myTabs);
  myTabs.myActivePopup.show(e.getComponent(), e.getX(), e.getY());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:TabLabel.java

示例4: createActionGroup

import com.intellij.openapi.actionSystem.DefaultActionGroup; //导入方法依赖的package包/类
@Override
protected ActionGroup createActionGroup() {
  DefaultActionGroup group = new DefaultActionGroup();
  group.add(createAllAction());
  group.add(createSelectMultipleValuesAction());
  if (!myDataHolder.getCurrentUser().isEmpty()) {
    group.add(createPredefinedValueAction(Collections.singleton(VcsLogUserFilterImpl.ME)));
  }
  group.addAll(createRecentItemsActionGroup());
  return group;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:UserFilterPopupComponent.java

示例5: initToolbar

import com.intellij.openapi.actionSystem.DefaultActionGroup; //导入方法依赖的package包/类
private void initToolbar(Project project) {
  DefaultActionGroup group = new DefaultActionGroup();
  group.add(new RefreshRemoteFileAction(myVirtualFile));
  for (RemoteFileEditorActionProvider actionProvider : RemoteFileEditorActionProvider.EP_NAME.getExtensions()) {
    group.addAll(actionProvider.createToolbarActions(project, myVirtualFile));
  }
  final ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, true);
  myToolbarPanel.add(actionToolbar.getComponent(), BorderLayout.CENTER);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:RemoteFilePanel.java

示例6: 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

示例7: 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

示例8: createHintToolbarComponent

import com.intellij.openapi.actionSystem.DefaultActionGroup; //导入方法依赖的package包/类
private JComponent createHintToolbarComponent() {
  final DefaultActionGroup addRemoveGroup = new DefaultActionGroup();
  addRemoveGroup.addAll(new AddHint(), new RemoveHint(), new ShowNext(), new ShowPrevious());
  return ActionManager.getInstance().createActionToolbar("Hint", addRemoveGroup, false).getComponent();
}
 
开发者ID:medvector,项目名称:educational-plugin,代码行数:6,代码来源:CCCreateAnswerPlaceholderPanel.java

示例9: addActionBlock

import com.intellij.openapi.actionSystem.DefaultActionGroup; //导入方法依赖的package包/类
public static void addActionBlock(@NotNull DefaultActionGroup group, @Nullable List<? extends AnAction> actions) {
  if (actions == null || actions.isEmpty()) return;
  if (group.getChildrenCount() != 0) group.addSeparator();
  group.addAll(actions);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:DiffUtil.java

示例10: fillPopupWithCurrentRepositoryActions

import com.intellij.openapi.actionSystem.DefaultActionGroup; //导入方法依赖的package包/类
@Override
protected void fillPopupWithCurrentRepositoryActions(@NotNull DefaultActionGroup popupGroup, @Nullable DefaultActionGroup actions) {
  popupGroup.addAll(new GitBranchPopupActions(myCurrentRepository.getProject(), myCurrentRepository).createActions(actions));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GitBranchPopup.java

示例11: fillPopupWithCurrentRepositoryActions

import com.intellij.openapi.actionSystem.DefaultActionGroup; //导入方法依赖的package包/类
protected void fillPopupWithCurrentRepositoryActions(@NotNull DefaultActionGroup popupGroup, @Nullable DefaultActionGroup actions) {
  popupGroup.addAll(new HgBranchPopupActions(myProject, myCurrentRepository).createActions(actions));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:HgBranchPopup.java


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