本文整理汇总了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;
}
示例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;
}
示例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());
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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();
}
示例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);
}
示例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));
}
示例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));
}