Merge from vscode 1fbacccbc900bb59ba8a8f26a4128d48a1c97842

This commit is contained in:
ADS Merger
2020-02-13 02:56:02 +00:00
parent 9af1f3b0eb
commit 73ea8b79b2
229 changed files with 3192 additions and 2103 deletions

View File

@@ -34,8 +34,9 @@ import { isSessionAttach } from 'vs/workbench/contrib/debug/common/debugUtils';
import { STOP_ID, STOP_LABEL, DISCONNECT_ID, DISCONNECT_LABEL, RESTART_SESSION_ID, RESTART_LABEL, STEP_OVER_ID, STEP_OVER_LABEL, STEP_INTO_LABEL, STEP_INTO_ID, STEP_OUT_LABEL, STEP_OUT_ID, PAUSE_ID, PAUSE_LABEL, CONTINUE_ID, CONTINUE_LABEL } from 'vs/workbench/contrib/debug/browser/debugCommands';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { CollapseAction } from 'vs/workbench/browser/viewlet';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
import { IViewDescriptorService } from 'vs/workbench/common/views';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { IOpenerService } from 'vs/platform/opener/common/opener';
const $ = dom.$;
@@ -98,8 +99,10 @@ export class CallStackView extends ViewPane {
@IConfigurationService configurationService: IConfigurationService,
@IMenuService menuService: IMenuService,
@IContextKeyService readonly contextKeyService: IContextKeyService,
@IOpenerService openerService: IOpenerService,
@IThemeService themeService: IThemeService,
) {
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('callstackSection', "Call Stack Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService);
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('callstackSection', "Call Stack Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService);
this.callStackItemType = CONTEXT_CALLSTACK_ITEM_TYPE.bindTo(contextKeyService);
this.contributedContextMenu = menuService.createMenu(MenuId.DebugCallStackContext, contextKeyService);
@@ -116,16 +119,11 @@ export class CallStackView extends ViewPane {
this.pauseMessageLabel.title = thread.stoppedDetails.text || '';
dom.toggleClass(this.pauseMessageLabel, 'exception', thread.stoppedDetails.reason === 'exception');
this.pauseMessage.hidden = false;
if (this.toolbar) {
this.toolbar.setActions([])();
}
this.updateActions();
} else {
this.pauseMessage.hidden = true;
if (this.toolbar) {
const collapseAction = new CollapseAction(this.tree, true, 'explorer-action codicon-collapse-all');
this.toolbar.setActions([collapseAction])();
}
this.updateActions();
}
this.needsRefresh = false;
@@ -150,7 +148,17 @@ export class CallStackView extends ViewPane {
this.pauseMessageLabel = dom.append(this.pauseMessage, $('span.label'));
}
getActions(): IAction[] {
if (this.pauseMessage.hidden) {
return [new CollapseAction(this.tree, true, 'explorer-action codicon-collapse-all')];
}
return [];
}
renderBody(container: HTMLElement): void {
super.renderBody(container);
dom.addClass(container, 'debug-call-stack');
const treeContainer = renderViewTree(container);
@@ -197,7 +205,7 @@ export class CallStackView extends ViewPane {
},
expandOnlyOnTwistieClick: true,
overrideStyles: {
listBackground: SIDE_BAR_BACKGROUND
listBackground: this.getBackgroundColor()
}
});
@@ -290,6 +298,12 @@ export class CallStackView extends ViewPane {
this.parentSessionToExpand.add(s.parentSession);
}
}));
this._register(this.viewDescriptorService.onDidChangeLocation(({ views, from, to }) => {
if (views.some(v => v.id === this.id)) {
this.tree.updateOptions({ overrideStyles: { listBackground: this.getBackgroundColor() } });
}
}));
}
layoutBody(height: number, width: number): void {