未验证 提交 83fac397 编写于 作者: R Robo 提交者: GitHub

Merge branch 'master' into update_electron

......@@ -372,24 +372,24 @@ export class CustomTreeView extends Disposable implements ITreeView {
this.tree = this._register(this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'CustomView', this.treeContainer, new CustomTreeDelegate(), [renderer],
dataSource, {
identityProvider: new CustomViewIdentityProvider(),
accessibilityProvider: {
getAriaLabel(element: ITreeItem): string {
return element.tooltip ? element.tooltip : element.label ? element.label.label : '';
}
},
ariaLabel: this.title,
keyboardNavigationLabelProvider: {
getKeyboardNavigationLabel: (item: ITreeItem) => {
return item.label ? item.label.label : (item.resourceUri ? basename(URI.revive(item.resourceUri)) : undefined);
}
},
expandOnlyOnTwistieClick: (e: ITreeItem) => !!e.command,
collapseByDefault: (e: ITreeItem): boolean => {
return e.collapsibleState !== TreeItemCollapsibleState.Expanded;
},
multipleSelectionSupport: this.canSelectMany,
}) as WorkbenchAsyncDataTree<ITreeItem, ITreeItem, FuzzyScore>);
identityProvider: new CustomViewIdentityProvider(),
accessibilityProvider: {
getAriaLabel(element: ITreeItem): string {
return element.tooltip ? element.tooltip : element.label ? element.label.label : '';
}
},
ariaLabel: this.title,
keyboardNavigationLabelProvider: {
getKeyboardNavigationLabel: (item: ITreeItem) => {
return item.label ? item.label.label : (item.resourceUri ? basename(URI.revive(item.resourceUri)) : undefined);
}
},
expandOnlyOnTwistieClick: (e: ITreeItem) => !!e.command,
collapseByDefault: (e: ITreeItem): boolean => {
return e.collapsibleState !== TreeItemCollapsibleState.Expanded;
},
multipleSelectionSupport: this.canSelectMany,
}) as WorkbenchAsyncDataTree<ITreeItem, ITreeItem, FuzzyScore>);
aligner.tree = this.tree;
const actionRunner = new MultipleSelectionActionRunner(() => this.tree!.getSelection());
renderer.actionRunner = actionRunner;
......
......@@ -77,16 +77,16 @@ export class BreakpointsView extends ViewletPanel {
this.instantiationService.createInstance(DataBreakpointsRenderer),
new FunctionBreakpointInputRenderer(this.debugService, this.contextViewService, this.themeService)
], {
identityProvider: { getId: (element: IEnablement) => element.getId() },
multipleSelectionSupport: false,
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IEnablement) => e },
ariaProvider: {
getSetSize: (_: IEnablement, index: number, listLength: number) => listLength,
getPosInSet: (_: IEnablement, index: number) => index,
getRole: (breakpoint: IEnablement) => 'checkbox',
isChecked: (breakpoint: IEnablement) => breakpoint.enabled
}
});
identityProvider: { getId: (element: IEnablement) => element.getId() },
multipleSelectionSupport: false,
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IEnablement) => e },
ariaProvider: {
getSetSize: (_: IEnablement, index: number, listLength: number) => listLength,
getPosInSet: (_: IEnablement, index: number) => index,
getRole: (breakpoint: IEnablement) => 'checkbox',
isChecked: (breakpoint: IEnablement) => breakpoint.enabled
}
});
CONTEXT_BREAKPOINTS_FOCUSED.bindTo(this.list.contextKeyService);
......
......@@ -113,40 +113,40 @@ export class CallStackView extends ViewletPanel {
new LoadMoreRenderer(),
new ShowMoreRenderer()
], this.dataSource, {
accessibilityProvider: new CallStackAccessibilityProvider(),
ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'callStackAriaLabel' }, "Debug Call Stack"),
identityProvider: {
getId: (element: CallStackItem) => {
if (typeof element === 'string') {
return element;
}
if (element instanceof Array) {
return `showMore ${element[0].getId()}`;
}
accessibilityProvider: new CallStackAccessibilityProvider(),
ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'callStackAriaLabel' }, "Debug Call Stack"),
identityProvider: {
getId: (element: CallStackItem) => {
if (typeof element === 'string') {
return element;
}
if (element instanceof Array) {
return `showMore ${element[0].getId()}`;
}
return element.getId();
}
},
keyboardNavigationLabelProvider: {
getKeyboardNavigationLabel: (e: CallStackItem) => {
if (isDebugSession(e)) {
return e.getLabel();
}
if (e instanceof Thread) {
return `${e.name} ${e.stateLabel}`;
}
if (e instanceof StackFrame || typeof e === 'string') {
return e;
}
if (e instanceof ThreadAndSessionIds) {
return LoadMoreRenderer.LABEL;
return element.getId();
}
},
keyboardNavigationLabelProvider: {
getKeyboardNavigationLabel: (e: CallStackItem) => {
if (isDebugSession(e)) {
return e.getLabel();
}
if (e instanceof Thread) {
return `${e.name} ${e.stateLabel}`;
}
if (e instanceof StackFrame || typeof e === 'string') {
return e;
}
if (e instanceof ThreadAndSessionIds) {
return LoadMoreRenderer.LABEL;
}
return nls.localize('showMoreStackFrames2', "Show More Stack Frames");
}
},
expandOnlyOnTwistieClick: true
});
return nls.localize('showMoreStackFrames2', "Show More Stack Frames");
}
},
expandOnlyOnTwistieClick: true
});
this.tree.setInput(this.debugService.getModel()).then(undefined, onUnexpectedError);
......
......@@ -75,11 +75,11 @@ export class DebugHoverWidget implements IContentWidget {
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'DebugHover', this.treeContainer, new DebugHoverDelegate(), [this.instantiationService.createInstance(VariablesRenderer)],
dataSource, {
ariaLabel: nls.localize('treeAriaLabel', "Debug Hover"),
accessibilityProvider: new DebugHoverAccessibilityProvider(),
mouseSupport: false,
horizontalScrolling: true
});
ariaLabel: nls.localize('treeAriaLabel', "Debug Hover"),
accessibilityProvider: new DebugHoverAccessibilityProvider(),
mouseSupport: false,
horizontalScrolling: true
});
this.valueContainer = $('.value');
this.valueContainer.tabIndex = 0;
......
......@@ -89,11 +89,11 @@ export class VariablesView extends ViewletPanel {
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'VariablesView', treeContainer, new VariablesDelegate(),
[this.instantiationService.createInstance(VariablesRenderer), new ScopesRenderer()],
new VariablesDataSource(), {
ariaLabel: nls.localize('variablesAriaTreeLabel', "Debug Variables"),
accessibilityProvider: new VariablesAccessibilityProvider(),
identityProvider: { getId: (element: IExpression | IScope) => element.getId() },
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression | IScope) => e }
});
ariaLabel: nls.localize('variablesAriaTreeLabel', "Debug Variables"),
accessibilityProvider: new VariablesAccessibilityProvider(),
identityProvider: { getId: (element: IExpression | IScope) => element.getId() },
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression | IScope) => e }
});
this.tree.setInput(this.debugService.getViewModel()).then(null, onUnexpectedError);
......
......@@ -63,12 +63,12 @@ export class WatchExpressionsView extends ViewletPanel {
const expressionsRenderer = this.instantiationService.createInstance(WatchExpressionsRenderer);
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'WatchExpressions', treeContainer, new WatchExpressionsDelegate(), [expressionsRenderer, this.instantiationService.createInstance(VariablesRenderer)],
new WatchExpressionsDataSource(), {
ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'watchAriaTreeLabel' }, "Debug Watch Expressions"),
accessibilityProvider: new WatchExpressionsAccessibilityProvider(),
identityProvider: { getId: (element: IExpression) => element.getId() },
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression) => e },
dnd: new WatchExpressionsDragAndDrop(this.debugService),
});
ariaLabel: nls.localize({ comment: ['Debug is a noun in this context, not a verb.'], key: 'watchAriaTreeLabel' }, "Debug Watch Expressions"),
accessibilityProvider: new WatchExpressionsAccessibilityProvider(),
identityProvider: { getId: (element: IExpression) => element.getId() },
keyboardNavigationLabelProvider: { getKeyboardNavigationLabel: (e: IExpression) => e },
dnd: new WatchExpressionsDragAndDrop(this.debugService),
});
this.tree.setInput(this.debugService).then(undefined, onUnexpectedError);
CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bindTo(this.tree.contextKeyService);
......
......@@ -407,10 +407,10 @@ export class RuntimeExtensionsEditor extends BaseEditor {
this._list = this._instantiationService.createInstance(WorkbenchList,
'RuntimeExtensions',
parent, delegate, [renderer], {
multipleSelectionSupport: false,
setRowLineHeight: false,
horizontalScrolling: false
});
multipleSelectionSupport: false,
setRowLineHeight: false,
horizontalScrolling: false
});
this._list.splice(0, this._list.length, this._elements || undefined);
......
......@@ -277,33 +277,33 @@ export class ExplorerView extends ViewletPanel {
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'FileExplorer', container, new ExplorerDelegate(), [filesRenderer],
this.instantiationService.createInstance(ExplorerDataSource), {
accessibilityProvider: new ExplorerAccessibilityProvider(),
ariaLabel: nls.localize('treeAriaLabel', "Files Explorer"),
identityProvider: {
getId: (stat: ExplorerItem) => {
if (stat instanceof NewExplorerItem) {
return `new:${stat.resource}`;
accessibilityProvider: new ExplorerAccessibilityProvider(),
ariaLabel: nls.localize('treeAriaLabel', "Files Explorer"),
identityProvider: {
getId: (stat: ExplorerItem) => {
if (stat instanceof NewExplorerItem) {
return `new:${stat.resource}`;
}
return stat.resource;
}
return stat.resource;
}
},
keyboardNavigationLabelProvider: {
getKeyboardNavigationLabel: (stat: ExplorerItem) => {
if (this.explorerService.isEditable(stat)) {
return undefined;
},
keyboardNavigationLabelProvider: {
getKeyboardNavigationLabel: (stat: ExplorerItem) => {
if (this.explorerService.isEditable(stat)) {
return undefined;
}
return stat.name;
}
return stat.name;
}
},
multipleSelectionSupport: true,
filter: this.filter,
sorter: this.instantiationService.createInstance(FileSorter),
dnd: this.instantiationService.createInstance(FileDragAndDrop),
autoExpandSingleChildren: true,
additionalScrollHeight: ExplorerDelegate.ITEM_HEIGHT
});
},
multipleSelectionSupport: true,
filter: this.filter,
sorter: this.instantiationService.createInstance(FileSorter),
dnd: this.instantiationService.createInstance(FileDragAndDrop),
autoExpandSingleChildren: true,
additionalScrollHeight: ExplorerDelegate.ITEM_HEIGHT
});
this._register(this.tree);
// Bind context keys
......
......@@ -217,9 +217,9 @@ export class OpenEditorsView extends ViewletPanel {
new EditorGroupRenderer(this.keybindingService, this.instantiationService),
new OpenEditorRenderer(this.listLabels, this.instantiationService, this.keybindingService, this.configurationService)
], {
identityProvider: { getId: (element: OpenEditor | IEditorGroup) => element instanceof OpenEditor ? element.getId() : element.id.toString() },
dnd: new OpenEditorsDragAndDrop(this.instantiationService, this.editorGroupService)
});
identityProvider: { getId: (element: OpenEditor | IEditorGroup) => element instanceof OpenEditor ? element.getId() : element.id.toString() },
dnd: new OpenEditorsDragAndDrop(this.instantiationService, this.editorGroupService)
});
this._register(this.list);
this._register(this.listLabels);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册