本文整理汇总了Java中com.intellij.ide.CommonActionsManager类的典型用法代码示例。如果您正苦于以下问题:Java CommonActionsManager类的具体用法?Java CommonActionsManager怎么用?Java CommonActionsManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CommonActionsManager类属于com.intellij.ide包,在下文中一共展示了CommonActionsManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addCollapseExpandActions
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
protected void addCollapseExpandActions(final List<AnAction> result) {
final TreeExpander expander = new TreeExpander() {
@Override
public void expandAll() {
TreeUtil.expandAll(myTree);
}
@Override
public boolean canExpand() {
return true;
}
@Override
public void collapseAll() {
TreeUtil.collapseAll(myTree, 0);
}
@Override
public boolean canCollapse() {
return true;
}
};
final CommonActionsManager actionsManager = CommonActionsManager.getInstance();
result.add(actionsManager.createExpandAllAction(expander, myTree));
result.add(actionsManager.createCollapseAllAction(expander, myTree));
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:BaseStructureConfigurable.java
示例2: createPopupGroup
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
private ActionGroup createPopupGroup() {
final DefaultActionGroup group = new DefaultActionGroup();
group.add(new PutSourceItemIntoDefaultLocationAction(this, myArtifactsEditor));
group.add(new PackAndPutIntoDefaultLocationAction(this, myArtifactsEditor));
group.add(new PutSourceItemIntoParentAndLinkViaManifestAction(this, myArtifactsEditor));
group.add(new ExtractIntoDefaultLocationAction(this, myArtifactsEditor));
group.add(Separator.getInstance());
group.add(new SourceItemNavigateAction(this));
group.add(new SourceItemFindUsagesAction(this, myArtifactsEditor.getContext().getProject(), myArtifactsEditor.getContext().getParent()));
DefaultTreeExpander expander = new DefaultTreeExpander(this);
final CommonActionsManager commonActionsManager = CommonActionsManager.getInstance();
group.add(Separator.getInstance());
group.addAction(commonActionsManager.createExpandAllAction(expander, this));
group.addAction(commonActionsManager.createCollapseAllAction(expander, this));
return group;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:SourceItemsTree.java
示例3: createToolbar
import com.intellij.ide.CommonActionsManager; //导入依赖的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
示例4: createToolbar
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
private JComponent createToolbar() {
DefaultActionGroup group = new DefaultActionGroup();
group.add(new CloseAction());
group.add(new RerunAction(this));
group.add(new FlattenPackagesAction());
group.add(new ShowFilesAction());
if (ModuleManager.getInstance(myProject).getModules().length > 1) {
group.add(new ShowModulesAction());
group.add(new ShowModuleGroupsAction());
}
group.add(new GroupByScopeTypeAction());
//group.add(new GroupByFilesAction());
group.add(new FilterLegalsAction());
group.add(new MarkAsIllegalAction());
group.add(new ChooseScopeTypeAction());
group.add(new EditDependencyRulesAction());
group.add(CommonActionsManager.getInstance().createExportToTextFileAction(new DependenciesExporterToTextFile()));
group.add(new ContextHelpAction("dependency.viewer.tool.window"));
ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, true);
return toolbar.getComponent();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:DependenciesPanel.java
示例5: appendActions
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
protected void appendActions(@NotNull DefaultActionGroup actionGroup, @Nullable String helpID) {
actionGroup.add(myAutoScrollToSourceHandler.createToggleAction());
final ActionManager actionManager = ActionManager.getInstance();
actionGroup.add(actionManager.getAction(IdeActions.ACTION_EXPAND_ALL));
actionGroup.add(new PinToolwindowTabAction(){
@Override
public void update(AnActionEvent event) {
super.update(event);
// sometimes there is no content to close, e.g. in usage view preview
event.getPresentation().setVisible(myContent != null);
}
});
actionGroup.add(CommonActionsManager.getInstance().createExportToTextFileAction(new ExporterToTextFileHierarchy(this)));
actionGroup.add(new CloseAction());
if (helpID != null) {
actionGroup.add(new ContextHelpAction(helpID));
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:HierarchyBrowserBase.java
示例6: createTreePanel
import com.intellij.ide.CommonActionsManager; //导入依赖的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
示例7: createTreePanel
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
@NotNull
public static ToolWindowAlikePanel createTreePanel(@NotNull String title, @NotNull JTree tree) {
ToolWindowAlikePanel panel = new ToolWindowAlikePanel(title, createScrollPane(tree));
Object root = tree.getModel().getRoot();
if (root instanceof TreeNode && ((TreeNode)root).getChildCount() > 0) {
TreeExpander expander = new DefaultTreeExpander(tree);
CommonActionsManager actions = CommonActionsManager.getInstance();
AnAction expandAllAction = actions.createExpandAllAction(expander, tree);
expandAllAction.getTemplatePresentation().setIcon(ExpandAll);
AnAction collapseAllAction = actions.createCollapseAllAction(expander, tree);
collapseAllAction.getTemplatePresentation().setIcon(CollapseAll);
panel.setAdditionalTitleActions(expandAllAction, collapseAllAction);
}
return panel;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:ToolWindowAlikePanel.java
示例8: createToolbarPanel
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
private JPanel createToolbarPanel() {
final DefaultActionGroup group = new DefaultActionGroup();
group.add(new AddAction());
group.add(new RemoveAction());
group.add(new RunAction());
group.add(new ShowAllTargetsAction());
AnAction action = CommonActionsManager.getInstance().createExpandAllAction(myTreeExpander, this);
action.getTemplatePresentation().setDescription(AntBundle.message("ant.explorer.expand.all.nodes.action.description"));
group.add(action);
action = CommonActionsManager.getInstance().createCollapseAllAction(myTreeExpander, this);
action.getTemplatePresentation().setDescription(AntBundle.message("ant.explorer.collapse.all.nodes.action.description"));
group.add(action);
group.add(myAntBuildFilePropertiesAction);
group.add(new ContextHelpAction(HelpID.ANT));
final ActionToolbar actionToolBar = ActionManager.getInstance().createActionToolbar(ActionPlaces.ANT_EXPLORER_TOOLBAR, group, true);
return JBUI.Panels.simplePanel(actionToolBar.getComponent());
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:AntExplorer.java
示例9: StructureTabComponent
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
private StructureTabComponent(Disposable disposable) {
super("Structure");
myEventModel = new GeneratedStructureModel();
final StructureTree tree = new StructureTree(myEventModel);
myComponent = ScrollPaneFactory.createScrollPane(tree);
myEventModel.addTreeModelListener(new SmartStructureTracker(tree, disposable));
final DefaultActionGroup structureActions = new DefaultActionGroup();
final StructureTreeExpander expander = new StructureTreeExpander(tree);
final CommonActionsManager actionsManager = CommonActionsManager.getInstance();
structureActions.add(new HideWhitespaceAction(tree, myEventModel));
structureActions.add(actionsManager.createExpandAllAction(expander, tree));
structureActions.add(actionsManager.createCollapseAllAction(expander, tree));
myToolbarActions = structureActions;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:StructureTabComponent.java
示例10: fillToolBarActions
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
protected List<AnAction> fillToolBarActions(final DefaultActionGroup toolbarActions,
final Executor defaultExecutor,
final RunContentDescriptor contentDescriptor) {
List<AnAction> actionList = ContainerUtil.newArrayList();
//stop
final AnAction stopAction = createStopAction();
actionList.add(stopAction);
//close
final AnAction closeAction = createCloseAction(defaultExecutor, contentDescriptor);
actionList.add(closeAction);
// run action
actionList.add(createConsoleExecAction(getLanguageConsole(), myProcessHandler, myConsoleExecuteActionHandler));
// Help
actionList.add(CommonActionsManager.getInstance().createHelpAction("interactive_console"));
toolbarActions.addAll(actionList);
return actionList;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:25,代码来源:AbstractConsoleRunnerWithHistory.java
示例11: createToolbarPanel
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
private JPanel createToolbarPanel() {
final DefaultActionGroup group = new DefaultActionGroup();
group.add(new AddAction());
group.add(new RemoveAction());
group.add(new RunAction());
group.add(new ShowAllTargetsAction());
AnAction action = CommonActionsManager.getInstance().createExpandAllAction(myTreeExpander, this);
action.getTemplatePresentation().setDescription(AntBundle.message("ant.explorer.expand.all.nodes.action.description"));
group.add(action);
action = CommonActionsManager.getInstance().createCollapseAllAction(myTreeExpander, this);
action.getTemplatePresentation().setDescription(AntBundle.message("ant.explorer.collapse.all.nodes.action.description"));
group.add(action);
group.add(myAntBuildFilePropertiesAction);
group.add(new ContextHelpAction(HelpID.ANT));
final ActionToolbar actionToolBar = ActionManager.getInstance().createActionToolbar(ActionPlaces.ANT_EXPLORER_TOOLBAR, group, true);
final JPanel buttonsPanel = new JPanel(new BorderLayout());
buttonsPanel.add(actionToolBar.getComponent(), BorderLayout.CENTER);
return buttonsPanel;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:AntExplorer.java
示例12: createToolbarPanel
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
private JPanel createToolbarPanel() {
final DefaultActionGroup group = new DefaultActionGroup();
group.add(new AddAction());
group.add(new RemoveAction());
group.add(new RunAction());
group.add(myAntBuildFilePropertiesAction);
group.addSeparator();
group.add(new ShowAllTargetsAction());
group.add(new ShowModuleGrouping());
AnAction action = CommonActionsManager.getInstance().createExpandAllAction(myTreeExpander, this);
action.getTemplatePresentation().setDescription(AntBundle.message("ant.explorer.expand.all.nodes.action.description"));
group.add(action);
action = CommonActionsManager.getInstance().createCollapseAllAction(myTreeExpander, this);
action.getTemplatePresentation().setDescription(AntBundle.message("ant.explorer.collapse.all.nodes.action.description"));
group.add(action);
group.addSeparator();
group.add(new ContextHelpAction(HelpID.ANT));
final ActionToolbar actionToolBar = ActionManager.getInstance().createActionToolbar(ActionPlaces.ANT_EXPLORER_TOOLBAR, group, true);
final JPanel buttonsPanel = new JPanel(new BorderLayout());
buttonsPanel.add(actionToolBar.getComponent(), BorderLayout.CENTER);
return buttonsPanel;
}
开发者ID:consulo,项目名称:consulo-apache-ant,代码行数:24,代码来源:AntExplorer.java
示例13: createToolbar
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
private ActionToolbarImpl createToolbar() {
final DefaultActionGroup framesGroup = new DefaultActionGroup();
CommonActionsManager actionsManager = CommonActionsManager.getInstance();
framesGroup.add(actionsManager.createPrevOccurenceAction(myFramesList));
framesGroup.add(actionsManager.createNextOccurenceAction(myFramesList));
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:consulo,项目名称:consulo,代码行数:17,代码来源:XFramesView.java
示例14: createPanel
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
private void createPanel() {
myPanel = new JPanel(new BorderLayout());
final DefaultActionGroup group = new DefaultActionGroup();
final ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar("SPECIFIC_FILES_DIALOG", group, true);
addCustomActions(group, actionToolbar);
final CommonActionsManager cam = CommonActionsManager.getInstance();
final Expander expander = new Expander();
group.addSeparator();
group.add(new ToggleShowFlattenAction());
group.add(cam.createExpandAllAction(expander, myView));
group.add(cam.createCollapseAllAction(expander, myView));
myPanel.add(actionToolbar.getComponent(), BorderLayout.NORTH);
myPanel.add(ScrollPaneFactory.createScrollPane(myView), BorderLayout.CENTER);
myView.setShowFlatten(false);
}
开发者ID:consulo,项目名称:consulo,代码行数:20,代码来源:SpecificFilesViewDialog.java
示例15: createPopupGroup
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
private ActionGroup createPopupGroup() {
final DefaultActionGroup group = new DefaultActionGroup();
group.add(new PutSourceItemIntoDefaultLocationAction(this, myArtifactsEditor));
group.add(new PackAndPutIntoDefaultLocationAction(this, myArtifactsEditor));
// java specific group.add(new PutSourceItemIntoParentAndLinkViaManifestAction(this, myArtifactsEditor));
group.add(new ExtractIntoDefaultLocationAction(this, myArtifactsEditor));
group.add(AnSeparator.getInstance());
group.add(new SourceItemNavigateAction(this));
group.add(new SourceItemFindUsagesAction(this, myArtifactsEditor.getContext().getProject(), myArtifactsEditor.getContext().getParent()));
DefaultTreeExpander expander = new DefaultTreeExpander(this);
final CommonActionsManager commonActionsManager = CommonActionsManager.getInstance();
group.add(AnSeparator.getInstance());
group.addAction(commonActionsManager.createExpandAllAction(expander, this));
group.addAction(commonActionsManager.createCollapseAllAction(expander, this));
return group;
}
开发者ID:consulo,项目名称:consulo,代码行数:19,代码来源:SourceItemsTree.java
示例16: createPopupActionGroup
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
private DefaultActionGroup createPopupActionGroup() {
final LayoutTree tree = myLayoutTreeComponent.getLayoutTree();
DefaultActionGroup popupActionGroup = new DefaultActionGroup();
popupActionGroup.add(createAddGroup());
final RemovePackagingElementAction removeAction = new RemovePackagingElementAction(this);
removeAction.registerCustomShortcutSet(CommonShortcuts.getDelete(), tree);
popupActionGroup.add(removeAction);
popupActionGroup.add(new ExtractArtifactAction(this));
popupActionGroup.add(new InlineArtifactAction(this));
popupActionGroup.add(new RenamePackagingElementAction(this));
popupActionGroup.add(new SurroundElementWithAction(this));
popupActionGroup.add(AnSeparator.getInstance());
popupActionGroup.add(new HideContentAction(this));
popupActionGroup.add(new LayoutTreeNavigateAction(myLayoutTreeComponent));
popupActionGroup.add(new LayoutTreeFindUsagesAction(myLayoutTreeComponent, myProject, myContext.getParent()));
popupActionGroup.add(AnSeparator.getInstance());
CommonActionsManager actionsManager = CommonActionsManager.getInstance();
DefaultTreeExpander treeExpander = new DefaultTreeExpander(tree);
popupActionGroup.add(actionsManager.createExpandAllAction(treeExpander, tree));
popupActionGroup.add(actionsManager.createCollapseAllAction(treeExpander, tree));
return popupActionGroup;
}
开发者ID:consulo,项目名称:consulo,代码行数:25,代码来源:ArtifactEditorImpl.java
示例17: createPopupActionGroup
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
private DefaultActionGroup createPopupActionGroup() {
final LayoutTree tree = myLayoutTreeComponent.getLayoutTree();
DefaultActionGroup popupActionGroup = new DefaultActionGroup();
final List<AnAction> createActions = new ArrayList<AnAction>();
AddCompositeElementAction.addCompositeCreateActions(createActions, this);
for (AnAction createAction : createActions) {
popupActionGroup.add(createAction);
}
popupActionGroup.add(createAddNonCompositeElementGroup());
final RemovePackagingElementAction removeAction = new RemovePackagingElementAction(this);
removeAction.registerCustomShortcutSet(CommonShortcuts.getDelete(), tree);
popupActionGroup.add(removeAction);
popupActionGroup.add(new ExtractArtifactAction(this));
popupActionGroup.add(new InlineArtifactAction(this));
popupActionGroup.add(new RenamePackagingElementAction(this));
popupActionGroup.add(new SurroundElementWithAction(this));
popupActionGroup.add(Separator.getInstance());
popupActionGroup.add(new HideContentAction(this));
popupActionGroup.add(new LayoutTreeNavigateAction(myLayoutTreeComponent));
popupActionGroup.add(new LayoutTreeFindUsagesAction(myLayoutTreeComponent, myProject, myContext.getParent()));
popupActionGroup.add(Separator.getInstance());
CommonActionsManager actionsManager = CommonActionsManager.getInstance();
DefaultTreeExpander treeExpander = new DefaultTreeExpander(tree);
popupActionGroup.add(actionsManager.createExpandAllAction(treeExpander, tree));
popupActionGroup.add(actionsManager.createCollapseAllAction(treeExpander, tree));
return popupActionGroup;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:ArtifactEditorImpl.java
示例18: createNorthPanel
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
@Override
protected JComponent createNorthPanel() {
final DefaultActionGroup group = new DefaultActionGroup();
final TreeExpander expander = new DefaultTreeExpander(myTree);
final CommonActionsManager actionsManager = CommonActionsManager.getInstance();
group.add(actionsManager.createExpandAllAction(expander, myTree));
group.add(actionsManager.createCollapseAllAction(expander, myTree));
final JComponent component = ActionManager.getInstance().createActionToolbar(ActionPlaces.PROJECT_VIEW_TOOLBAR, group, true).getComponent();
component.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.darkGray), component.getBorder()));
return component;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:ChooseLibrariesDialogBase.java
示例19: createTreePopupActions
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
private static ActionGroup createTreePopupActions(final boolean isRightTree, final Tree tree) {
DefaultActionGroup group = new DefaultActionGroup();
final TreeExpander treeExpander = new TreeExpander() {
@Override
public void expandAll() {
TreeUtil.expandAll(tree);
}
@Override
public boolean canExpand() {
return isRightTree;
}
@Override
public void collapseAll() {
TreeUtil.collapseAll(tree, 3);
}
@Override
public boolean canCollapse() {
return true;
}
};
final CommonActionsManager actionManager = CommonActionsManager.getInstance();
if (isRightTree){
group.add(actionManager.createExpandAllAction(treeExpander, tree));
}
group.add(actionManager.createCollapseAllAction(treeExpander, tree));
final ActionManager globalActionManager = ActionManager.getInstance();
group.add(globalActionManager.getAction(IdeActions.ACTION_EDIT_SOURCE));
group.add(Separator.getInstance());
group.add(globalActionManager.getAction(IdeActions.ACTION_ANALYZE_DEPENDENCIES));
group.add(globalActionManager.getAction(IdeActions.ACTION_ANALYZE_BACK_DEPENDENCIES));
group.add(globalActionManager.getAction(IdeActions.ACTION_ANALYZE_CYCLIC_DEPENDENCIES));
return group;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:38,代码来源:ModulesDependenciesPanel.java
示例20: updateHeaderActions
import com.intellij.ide.CommonActionsManager; //导入依赖的package包/类
private void updateHeaderActions(StructureView structureView) {
AnAction[] titleActions = AnAction.EMPTY_ARRAY;
if (structureView instanceof StructureViewComponent) {
JTree tree = ((StructureViewComponent)structureView).getTree();
titleActions = new AnAction[]{
CommonActionsManager.getInstance().createExpandAllHeaderAction(tree),
CommonActionsManager.getInstance().createCollapseAllHeaderAction(tree)};
}
myToolWindow.setTitleActions(titleActions);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:StructureViewWrapperImpl.java
注:本文中的com.intellij.ide.CommonActionsManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论