Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno committed Aug 30, 2019
1 parent d32c857 commit 53c4fa6
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 107 deletions.
36 changes: 18 additions & 18 deletions src/vs/workbench/browser/parts/views/customView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
20 changes: 10 additions & 10 deletions src/vs/workbench/contrib/debug/browser/breakpointsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
62 changes: 31 additions & 31 deletions src/vs/workbench/contrib/debug/browser/callStackView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
10 changes: 5 additions & 5 deletions src/vs/workbench/contrib/debug/browser/debugHover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions src/vs/workbench/contrib/debug/browser/variablesView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
12 changes: 6 additions & 6 deletions src/vs/workbench/contrib/debug/browser/watchExpressionsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
50 changes: 25 additions & 25 deletions src/vs/workbench/contrib/files/browser/views/explorerView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 53c4fa6

Please sign in to comment.