本文整理汇总了Java中com.intellij.ui.content.tabs.PinToolwindowTabAction类的典型用法代码示例。如果您正苦于以下问题:Java PinToolwindowTabAction类的具体用法?Java PinToolwindowTabAction怎么用?Java PinToolwindowTabAction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PinToolwindowTabAction类属于com.intellij.ui.content.tabs包,在下文中一共展示了PinToolwindowTabAction类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: appendActions
import com.intellij.ui.content.tabs.PinToolwindowTabAction; //导入依赖的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));
}
}
示例2: initActionGroup
import com.intellij.ui.content.tabs.PinToolwindowTabAction; //导入依赖的package包/类
private void initActionGroup(DefaultActionGroup group, final Content content) {
if (content == null) {
return;
}
group.addSeparator();
group.add(new TabbedContentAction.CloseAction(content));
group.add(myCloseAllAction);
group.add(new TabbedContentAction.CloseAllButThisAction(content));
group.addSeparator();
if (content.isPinnable()) {
group.add(PinToolwindowTabAction.getPinAction());
group.addSeparator();
}
group.add(myNextTabAction);
group.add(myPreviousTabAction);
group.add(myShowContent);
group.addSeparator();
}
示例3: appendActions
import com.intellij.ui.content.tabs.PinToolwindowTabAction; //导入依赖的package包/类
protected void appendActions(@NotNull DefaultActionGroup actionGroup, @Nullable String helpID) {
actionGroup.add(myAutoScrollToSourceHandler.createToggleAction());
actionGroup.add(ActionManager.getInstance().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(new CloseAction());
if (helpID != null) {
actionGroup.add(new ContextHelpAction(helpID));
}
}
示例4: appendActions
import com.intellij.ui.content.tabs.PinToolwindowTabAction; //导入依赖的package包/类
protected void appendActions(@Nonnull DefaultActionGroup actionGroup, @Nullable String helpID) {
actionGroup.add(myAutoScrollToSourceHandler.createToggleAction());
actionGroup.add(ActionManager.getInstance().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(new CloseAction());
if (helpID != null) {
actionGroup.add(new ContextHelpAction(helpID));
}
}
示例5: initActionGroup
import com.intellij.ui.content.tabs.PinToolwindowTabAction; //导入依赖的package包/类
private void initActionGroup(DefaultActionGroup group, final Content content) {
if (content == null) {
return;
}
group.addSeparator();
group.add(new TabbedContentAction.CloseAction(content));
group.add(myCloseAllAction);
group.add(new TabbedContentAction.CloseAllButThisAction(content));
group.addSeparator();
if (content.isPinnable()) {
group.add(PinToolwindowTabAction.getPinAction());
group.addSeparator();
}
group.add(myNextTabAction);
group.add(myPreviousTabAction);
group.add(myShowContent);
if (content instanceof TabbedContent && ((TabbedContent)content).getTabs().size() > 1) {
group.addAction(createSplitTabsAction((TabbedContent)content));
}
if (Boolean.TRUE == content.getUserData(Content.TABBED_CONTENT_KEY)) {
final String groupName = content.getUserData(Content.TAB_GROUP_NAME_KEY);
if (groupName != null) {
group.addAction(createMergeTabsAction(myManager, groupName));
}
}
group.addSeparator();
}
示例6: showPopup
import com.intellij.ui.content.tabs.PinToolwindowTabAction; //导入依赖的package包/类
/**
* Shows showPopup menu at the specified location. The <code>x</code> and <code>y</code> coordinates
* are in JTabbedPane coordinate system.
*/
private void showPopup(int x, int y) {
Content content = getContentAt(x, y);
if (content == null) {
return;
}
DefaultActionGroup group = new DefaultActionGroup();
group.add(new TabbedContentAction.CloseAction(content));
if (myTabbedPaneWrapper.getTabCount() > 1) {
group.add(new TabbedContentAction.CloseAllAction(myManager));
group.add(new TabbedContentAction.CloseAllButThisAction(content));
}
group.addSeparator();
group.add(PinToolwindowTabAction.getPinAction());
group.addSeparator();
group.add(new TabbedContentAction.MyNextTabAction(myManager));
group.add(new TabbedContentAction.MyPreviousTabAction(myManager));
final List<AnAction> additionalActions = myManager.getAdditionalPopupActions(content);
if (additionalActions != null) {
group.addSeparator();
for (AnAction anAction : additionalActions) {
group.add(anAction);
}
}
ActionPopupMenu menu = ActionManager.getInstance().createActionPopupMenu(POPUP_PLACE, group);
menu.getComponent().show(myTabbedPaneWrapper.getComponent(), x, y);
}
示例7: createActionToolbar
import com.intellij.ui.content.tabs.PinToolwindowTabAction; //导入依赖的package包/类
@NotNull
private ActionGroup createActionToolbar(@NotNull final RunContentDescriptor contentDescriptor) {
final DefaultActionGroup actionGroup = new DefaultActionGroup();
actionGroup.add(ActionManager.getInstance().getAction(IdeActions.ACTION_RERUN));
final AnAction[] actions = contentDescriptor.getRestartActions();
actionGroup.addAll(actions);
if (actions.length > 0) {
actionGroup.addSeparator();
}
actionGroup.add(ActionManager.getInstance().getAction(IdeActions.ACTION_STOP_PROGRAM));
if (myExecutionResult instanceof DefaultExecutionResult) {
actionGroup.addAll(((DefaultExecutionResult)myExecutionResult).getAdditionalStopActions());
}
actionGroup.addAll(myExecutionResult.getActions());
for (AnAction anAction : myRunnerActions) {
if (anAction != null) {
actionGroup.add(anAction);
}
else {
actionGroup.addSeparator();
}
}
actionGroup.addSeparator();
actionGroup.add(myUi.getOptions().getLayoutActions());
actionGroup.addSeparator();
actionGroup.add(PinToolwindowTabAction.getPinAction());
actionGroup.add(new CloseAction(myEnvironment.getExecutor(), contentDescriptor, myProject));
final String helpId = contentDescriptor.getHelpId();
actionGroup.add(new ContextHelpAction(helpId != null ? helpId : myEnvironment.getExecutor().getHelpId()));
return actionGroup;
}
示例8: createActionToolbar
import com.intellij.ui.content.tabs.PinToolwindowTabAction; //导入依赖的package包/类
@Nonnull
private ActionGroup createActionToolbar(@Nonnull RunContentDescriptor contentDescriptor) {
final DefaultActionGroup actionGroup = new DefaultActionGroup();
actionGroup.add(ActionManager.getInstance().getAction(IdeActions.ACTION_RERUN));
final AnAction[] actions = contentDescriptor.getRestartActions();
actionGroup.addAll(actions);
if (actions.length > 0) {
actionGroup.addSeparator();
}
actionGroup.add(ActionManager.getInstance().getAction(IdeActions.ACTION_STOP_PROGRAM));
if (myExecutionResult instanceof DefaultExecutionResult) {
actionGroup.addAll(((DefaultExecutionResult)myExecutionResult).getAdditionalStopActions());
}
actionGroup.addAll(myExecutionResult.getActions());
for (AnAction anAction : myRunnerActions) {
if (anAction != null) {
actionGroup.add(anAction);
}
else {
actionGroup.addSeparator();
}
}
actionGroup.addSeparator();
actionGroup.add(myUi.getOptions().getLayoutActions());
actionGroup.addSeparator();
actionGroup.add(PinToolwindowTabAction.getPinAction());
actionGroup.add(new CloseAction(myEnvironment.getExecutor(), contentDescriptor, myProject));
final String helpId = contentDescriptor.getHelpId();
actionGroup.add(new ContextHelpAction(helpId != null ? helpId : myEnvironment.getExecutor().getHelpId()));
return actionGroup;
}
示例9: attachToSession
import com.intellij.ui.content.tabs.PinToolwindowTabAction; //导入依赖的package包/类
private void attachToSession(@NotNull XDebugSessionImpl session) {
for (XDebugView view : myViews) {
session.addSessionListener(new XDebugViewSessionListener(view), myRunContentDescriptor);
}
XDebugTabLayouter layouter = session.getDebugProcess().createTabLayouter();
Content consoleContent = layouter.registerConsoleContent(myUi, myConsole);
attachNotificationTo(consoleContent);
layouter.registerAdditionalContent(myUi);
RunContentBuilder.addAdditionalConsoleEditorActions(myConsole, consoleContent);
if (ApplicationManager.getApplication().isUnitTestMode()) {
return;
}
DefaultActionGroup leftToolbar = new DefaultActionGroup();
final Executor debugExecutor = DefaultDebugExecutor.getDebugExecutorInstance();
if (myEnvironment != null) {
leftToolbar.add(ActionManager.getInstance().getAction(IdeActions.ACTION_RERUN));
List<AnAction> additionalRestartActions = session.getRestartActions();
if (!additionalRestartActions.isEmpty()) {
leftToolbar.addAll(additionalRestartActions);
leftToolbar.addSeparator();
}
leftToolbar.addAll(session.getExtraActions());
}
leftToolbar.addAll(getCustomizedActionGroup(XDebuggerActions.TOOL_WINDOW_LEFT_TOOLBAR_GROUP));
for (AnAction action : session.getExtraStopActions()) {
leftToolbar.add(action, new Constraints(Anchor.AFTER, IdeActions.ACTION_STOP_PROGRAM));
}
//group.addSeparator();
//addAction(group, DebuggerActions.EXPORT_THREADS);
leftToolbar.addSeparator();
leftToolbar.add(myUi.getOptions().getLayoutActions());
final AnAction[] commonSettings = myUi.getOptions().getSettingsActionsList();
DefaultActionGroup settings = new DefaultActionGroup(ActionsBundle.message("group.XDebugger.settings.text"), true);
settings.getTemplatePresentation().setIcon(myUi.getOptions().getSettingsActions().getTemplatePresentation().getIcon());
settings.addAll(commonSettings);
leftToolbar.add(settings);
leftToolbar.addSeparator();
leftToolbar.add(PinToolwindowTabAction.getPinAction());
leftToolbar.add(new CloseAction(myEnvironment != null ? myEnvironment.getExecutor() : debugExecutor, myRunContentDescriptor, myProject));
leftToolbar.add(new ContextHelpAction(debugExecutor.getHelpId()));
DefaultActionGroup topToolbar = new DefaultActionGroup();
topToolbar.addAll(getCustomizedActionGroup(XDebuggerActions.TOOL_WINDOW_TOP_TOOLBAR_GROUP));
session.getDebugProcess().registerAdditionalActions(leftToolbar, topToolbar, settings);
myUi.getOptions().setLeftToolbar(leftToolbar, ActionPlaces.DEBUGGER_TOOLBAR);
myUi.getOptions().setTopToolbar(topToolbar, ActionPlaces.DEBUGGER_TOOLBAR);
if (myEnvironment != null) {
initLogConsoles(myEnvironment.getRunProfile(), myRunContentDescriptor, myConsole);
}
}
示例10: createActionToolbar
import com.intellij.ui.content.tabs.PinToolwindowTabAction; //导入依赖的package包/类
private ActionGroup createActionToolbar(final RunContentDescriptor contentDescriptor, final JComponent component) {
final DefaultActionGroup actionGroup = new DefaultActionGroup();
final RestartAction restartAction = new RestartAction(myExecutor, myRunner, contentDescriptor, getEnvironment());
restartAction.registerShortcut(component);
actionGroup.add(restartAction);
contentDescriptor.setRestarter(new Runnable() {
@Override
public void run() {
restartAction.restart();
}
});
if (myExecutionResult instanceof DefaultExecutionResult) {
final AnAction[] actions = ((DefaultExecutionResult)myExecutionResult).getRestartActions();
if (actions != null) {
actionGroup.addAll(actions);
if (actions.length > 0) {
actionGroup.addSeparator();
}
}
}
final AnAction stopAction = ActionManager.getInstance().getAction(IdeActions.ACTION_STOP_PROGRAM);
actionGroup.add(stopAction);
if (myExecutionResult instanceof DefaultExecutionResult) {
actionGroup.addAll(((DefaultExecutionResult)myExecutionResult).getAdditionalStopActions());
}
actionGroup.addAll(myExecutionResult.getActions());
for (final AnAction anAction : myRunnerActions) {
if (anAction != null) {
actionGroup.add(anAction);
}
else {
actionGroup.addSeparator();
}
}
actionGroup.addSeparator();
actionGroup.add(myUi.getOptions().getLayoutActions());
actionGroup.addSeparator();
actionGroup.add(PinToolwindowTabAction.getPinAction());
actionGroup.add(new CloseAction(myExecutor, contentDescriptor, getProject()));
final String helpId = contentDescriptor.getHelpId();
actionGroup.add(new ContextHelpAction(helpId != null ? helpId : myExecutor.getHelpId()));
return actionGroup;
}
示例11: attachToSession
import com.intellij.ui.content.tabs.PinToolwindowTabAction; //导入依赖的package包/类
private void attachToSession(@Nonnull XDebugSessionImpl session) {
for (XDebugView view : myViews.values()) {
attachViewToSession(session, view);
}
XDebugTabLayouter layouter = session.getDebugProcess().createTabLayouter();
Content consoleContent = layouter.registerConsoleContent(myUi, myConsole);
attachNotificationTo(consoleContent);
layouter.registerAdditionalContent(myUi);
RunContentBuilder.addAdditionalConsoleEditorActions(myConsole, consoleContent);
if (ApplicationManager.getApplication().isUnitTestMode()) {
return;
}
DefaultActionGroup leftToolbar = new DefaultActionGroup();
final Executor debugExecutor = DefaultDebugExecutor.getDebugExecutorInstance();
if (myEnvironment != null) {
leftToolbar.add(ActionManager.getInstance().getAction(IdeActions.ACTION_RERUN));
List<AnAction> additionalRestartActions = session.getRestartActions();
if (!additionalRestartActions.isEmpty()) {
leftToolbar.addAll(additionalRestartActions);
leftToolbar.addSeparator();
}
leftToolbar.addAll(session.getExtraActions());
}
leftToolbar.addAll(getCustomizedActionGroup(XDebuggerActions.TOOL_WINDOW_LEFT_TOOLBAR_GROUP));
for (AnAction action : session.getExtraStopActions()) {
leftToolbar.add(action, new Constraints(Anchor.AFTER, IdeActions.ACTION_STOP_PROGRAM));
}
//group.addSeparator();
//addAction(group, DebuggerActions.EXPORT_THREADS);
leftToolbar.addSeparator();
leftToolbar.add(myUi.getOptions().getLayoutActions());
final AnAction[] commonSettings = myUi.getOptions().getSettingsActionsList();
DefaultActionGroup settings = new DefaultActionGroup(ActionsBundle.message("group.XDebugger.settings.text"), true);
settings.getTemplatePresentation().setIcon(myUi.getOptions().getSettingsActions().getTemplatePresentation().getIcon());
settings.addAll(commonSettings);
leftToolbar.add(settings);
leftToolbar.addSeparator();
leftToolbar.add(PinToolwindowTabAction.getPinAction());
leftToolbar.add(new CloseAction(myEnvironment != null ? myEnvironment.getExecutor() : debugExecutor, myRunContentDescriptor, myProject));
leftToolbar.add(new ContextHelpAction(debugExecutor.getHelpId()));
DefaultActionGroup topToolbar = new DefaultActionGroup();
topToolbar.addAll(getCustomizedActionGroup(XDebuggerActions.TOOL_WINDOW_TOP_TOOLBAR_GROUP));
session.getDebugProcess().registerAdditionalActions(leftToolbar, topToolbar, settings);
myUi.getOptions().setLeftToolbar(leftToolbar, ActionPlaces.DEBUGGER_TOOLBAR);
myUi.getOptions().setTopToolbar(topToolbar, ActionPlaces.DEBUGGER_TOOLBAR);
if (myEnvironment != null) {
initLogConsoles(myEnvironment.getRunProfile(), myRunContentDescriptor, myConsole);
}
}