Merge from vscode 2e5312cd61ff99c570299ecc122c52584265eda2

This commit is contained in:
ADS Merger
2020-04-23 02:50:35 +00:00
committed by Anthony Dresser
parent 3603f55d97
commit 7f1d8fc32f
659 changed files with 22709 additions and 12497 deletions

View File

@@ -18,7 +18,7 @@ import { CopyValueAction } from 'vs/workbench/contrib/debug/browser/debugActions
import { Separator } from 'vs/base/browser/ui/actionbar/actionbar';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ViewPane } from 'vs/workbench/browser/parts/views/viewPaneContainer';
import { IAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
import { IListAccessibilityProvider } from 'vs/base/browser/ui/list/listWidget';
import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list';
import { ITreeRenderer, ITreeNode, ITreeMouseEvent, ITreeContextMenuEvent, IAsyncDataSource } from 'vs/base/browser/ui/tree/tree';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
@@ -102,7 +102,6 @@ export class VariablesView extends ViewPane {
this.tree = <WorkbenchAsyncDataTree<IViewModel | IExpression | IScope, IExpression | IScope, FuzzyScore>>this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'VariablesView', treeContainer, new VariablesDelegate(),
[this.instantiationService.createInstance(VariablesRenderer), new ScopesRenderer(), new ScopeErrorRenderer()],
new VariablesDataSource(), {
ariaLabel: nls.localize('variablesAriaTreeLabel', "Debug Variables"),
accessibilityProvider: new VariablesAccessibilityProvider(),
identityProvider: { getId: (element: IExpression | IScope) => element.getId() },
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression | IScope) => e },
@@ -152,10 +151,11 @@ export class VariablesView extends ViewPane {
}
getActions(): IAction[] {
return [new CollapseAction(this.tree, true, 'explorer-action codicon-collapse-all')];
return [new CollapseAction(() => this.tree, true, 'explorer-action codicon-collapse-all')];
}
layoutBody(width: number, height: number): void {
super.layoutBody(height, width);
this.tree.layout(width, height);
}
@@ -348,7 +348,12 @@ export class VariablesRenderer extends AbstractExpressionsRenderer {
}
}
class VariablesAccessibilityProvider implements IAccessibilityProvider<IExpression | IScope> {
class VariablesAccessibilityProvider implements IListAccessibilityProvider<IExpression | IScope> {
getWidgetAriaLabel(): string {
return nls.localize('variablesAriaTreeLabel', "Debug Variables");
}
getAriaLabel(element: IExpression | IScope): string | null {
if (element instanceof Scope) {
return nls.localize('variableScopeAriaLabel', "Scope {0}, variables, debug", element.name);