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

@@ -30,8 +30,9 @@ import { HighlightedLabel, IHighlight } from 'vs/base/browser/ui/highlightedlabe
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { dispose } from 'vs/base/common/lifecycle';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
import { IViewDescriptorService } from 'vs/workbench/common/views';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { IThemeService } from 'vs/platform/theme/common/themeService';
const $ = dom.$;
let forgetScopes = true;
@@ -54,9 +55,11 @@ export class VariablesView extends ViewPane {
@IInstantiationService instantiationService: IInstantiationService,
@IViewDescriptorService viewDescriptorService: IViewDescriptorService,
@IClipboardService private readonly clipboardService: IClipboardService,
@IContextKeyService contextKeyService: IContextKeyService
@IContextKeyService contextKeyService: IContextKeyService,
@IOpenerService openerService: IOpenerService,
@IThemeService themeService: IThemeService,
) {
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('variablesSection', "Variables Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService);
super({ ...(options as IViewPaneOptions), ariaHeaderLabel: nls.localize('variablesSection', "Variables Section") }, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService);
// Use scheduler to prevent unnecessary flashing
this.onFocusStackFrameScheduler = new RunOnceScheduler(async () => {
@@ -85,6 +88,8 @@ export class VariablesView extends ViewPane {
}
renderBody(container: HTMLElement): void {
super.renderBody(container);
dom.addClass(container, 'debug-variables');
const treeContainer = renderViewTree(container);
@@ -96,7 +101,7 @@ export class VariablesView extends ViewPane {
identityProvider: { getId: (element: IExpression | IScope) => element.getId() },
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression | IScope) => e },
overrideStyles: {
listBackground: SIDE_BAR_BACKGROUND
listBackground: this.getBackgroundColor()
}
});
@@ -104,10 +109,6 @@ export class VariablesView extends ViewPane {
CONTEXT_VARIABLES_FOCUSED.bindTo(this.tree.contextKeyService);
if (this.toolbar) {
const collapseAction = new CollapseAction(this.tree, true, 'explorer-action codicon-collapse-all');
this.toolbar.setActions([collapseAction])();
}
this.tree.updateChildren();
this._register(this.debugService.getViewModel().onDidFocusStackFrame(sf => {
@@ -142,6 +143,15 @@ export class VariablesView extends ViewPane {
this.tree.rerender(e);
}
}));
this._register(this.viewDescriptorService.onDidChangeLocation(({ views, from, to }) => {
if (views.some(v => v.id === this.id)) {
this.tree.updateOptions({ overrideStyles: { listBackground: this.getBackgroundColor() } });
}
}));
}
getActions(): IAction[] {
return [new CollapseAction(this.tree, true, 'explorer-action codicon-collapse-all')];
}
layoutBody(width: number, height: number): void {