本文整理汇总了Java中com.intellij.xdebugger.ui.XDebugTabLayouter类的典型用法代码示例。如果您正苦于以下问题:Java XDebugTabLayouter类的具体用法?Java XDebugTabLayouter怎么用?Java XDebugTabLayouter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XDebugTabLayouter类属于com.intellij.xdebugger.ui包,在下文中一共展示了XDebugTabLayouter类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTabLayouter
import com.intellij.xdebugger.ui.XDebugTabLayouter; //导入依赖的package包/类
@NotNull
@Override
public XDebugTabLayouter createTabLayouter()
{
return new XDebugTabLayouter()
{
@Override
public void registerAdditionalContent(@NotNull RunnerLayoutUi ui)
{
Content content = ui.createContent("ScriptListView", myScriptListPanel, "Scripts", JavaScriptIcons.JavaScript, null);
content.setCloseable(false);
ui.addContent(content);
}
};
}
示例2: testRemoveConsolePane
import com.intellij.xdebugger.ui.XDebugTabLayouter; //导入依赖的package包/类
public void testRemoveConsolePane() {
// if this was a JUnit4 test case, we could set the LoggedErrorProcessor to a mock that does
// not fail the test if an error is logged using @BeforeClass. Since this is a JUnit3 test
// case, we need to elaborately initialize a user in GoogleLogin
CloudDebugProcessState state =
new CloudDebugProcessState(); // Mockito.mock(CloudDebugProcessState.class);
state.setUserEmail("[email protected]");
CredentialedUser credentialedUser = mock(CredentialedUser.class);
when(credentialedUser.getGoogleLoginState()).thenReturn(mock(GoogleLoginState.class));
LinkedHashMap<String, CredentialedUser> users = new LinkedHashMap<String, CredentialedUser>();
users.put(state.getUserEmail(), credentialedUser);
IntegratedGoogleLoginService mockGoogleLoginService =
TestUtils.installMockService(IntegratedGoogleLoginService.class);
when(mockGoogleLoginService.getAllUsers()).thenReturn(users);
process.initialize(state);
XDebugTabLayouter layouter = process.createTabLayouter();
RunnerLayoutUi ui = mock(RunnerLayoutUi.class);
Content console = mock(Content.class);
when(ui.findContent(DebuggerContentInfo.CONSOLE_CONTENT)).thenReturn(console);
ui.removeContent(console, false);
LayoutStateDefaults defaults = mock(LayoutStateDefaults.class);
when(ui.getDefaults()).thenReturn(defaults);
layouter.registerAdditionalContent(ui);
verify(ui, Mockito.atLeast(1)).removeContent(console, false);
process.getStateController().stopBackgroundListening();
UIUtil.dispatchAllInvocationEvents();
}
示例3: createTabLayouter
import com.intellij.xdebugger.ui.XDebugTabLayouter; //导入依赖的package包/类
@Override
@NotNull
public XDebugTabLayouter createTabLayouter() {
return getDefaultDebugProcesses().createTabLayouter();
}
示例4: createTabLayouter
import com.intellij.xdebugger.ui.XDebugTabLayouter; //导入依赖的package包/类
/**
* Override this method to customize content of tab in 'Debug' tool window
*/
@NotNull
public XDebugTabLayouter createTabLayouter() {
return new XDebugTabLayouter() {
};
}
示例5: attachToSession
import com.intellij.xdebugger.ui.XDebugTabLayouter; //导入依赖的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);
}
}
示例6: createTabLayouter
import com.intellij.xdebugger.ui.XDebugTabLayouter; //导入依赖的package包/类
@Override
@NotNull
public XDebugTabLayouter createTabLayouter() {
final CloudDebugProcessHandler handler = (CloudDebugProcessHandler) getProcessHandler();
return new XDebugTabLayouter() {
@Override
public void registerAdditionalContent(@NotNull RunnerLayoutUi layout) {
layout.removeContent(layout.findContent(DebuggerContentInfo.WATCHES_CONTENT), false);
// remove console since the cloud debugger doesn't use it
// https://github.com/GoogleCloudPlatform/gcloud-intellij/issues/141
Content consoleContent = layout.findContent(DebuggerContentInfo.CONSOLE_CONTENT);
if (consoleContent != null) {
layout.removeContent(consoleContent, false);
}
Content frameContent = layout.findContent(DebuggerContentInfo.FRAME_CONTENT);
if (frameContent != null) {
layout.removeContent(frameContent, false);
layout.addContent(frameContent, 0, PlaceInGrid.center, false);
}
Content variablesContent = layout.findContent(DebuggerContentInfo.VARIABLES_CONTENT);
if (variablesContent != null) {
layout.removeContent(variablesContent, false);
layout.addContent(variablesContent, 0, PlaceInGrid.right, false);
}
CloudDebugHistoricalSnapshots timeline = new CloudDebugHistoricalSnapshots(handler);
timeline.onBreakpointListChanged(getProcessState());
Content snapshots =
layout.createContent(
timeline.getTabTitle(),
(ComponentWithActions) timeline,
timeline.getTabTitle(),
GoogleCloudToolsIcons.STACKDRIVER_DEBUGGER,
null);
layout.addContent(snapshots, 0, PlaceInGrid.left, false);
layout
.getDefaults()
.initFocusContent(
timeline.getTabTitle(),
LayoutViewOptions.STARTUP,
new LayoutAttractionPolicy.FocusOnce(false));
}
};
}
示例7: createTabLayouter
import com.intellij.xdebugger.ui.XDebugTabLayouter; //导入依赖的package包/类
/**
* Override this method to customize content of tab in 'Debug' tool window
*/
@Nonnull
public XDebugTabLayouter createTabLayouter() {
return new XDebugTabLayouter() {
};
}
示例8: attachToSession
import com.intellij.xdebugger.ui.XDebugTabLayouter; //导入依赖的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);
}
}