當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。