Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/vs/workbench/browser/parts/editor/breadcrumbsPicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ export class BreadcrumbsFilePicker extends BreadcrumbsPicker {
const labels = this._instantiationService.createInstance(ResourceLabels, DEFAULT_LABELS_CONTAINER /* TODO@Jo visibility propagation */);
this._disposables.add(labels);

return <WorkbenchAsyncDataTree<IWorkspace | URI, IWorkspaceFolder | IFileStat, FuzzyScore>>this._instantiationService.createInstance(
WorkbenchAsyncDataTree,
return this._instantiationService.createInstance(
WorkbenchAsyncDataTree<IWorkspace | URI, IWorkspaceFolder | IFileStat, FuzzyScore>,
'BreadcrumbsFilePicker',
container,
new FileVirtualDelegate(),
Expand Down Expand Up @@ -464,8 +464,8 @@ export class BreadcrumbsOutlinePicker extends BreadcrumbsPicker {

const { config } = input.outline;

return <WorkbenchDataTree<IOutline<any>, any, FuzzyScore>>this._instantiationService.createInstance(
WorkbenchDataTree,
return this._instantiationService.createInstance(
WorkbenchDataTree<IOutline<any>, any, FuzzyScore>,
'BreadcrumbsOutlinePicker',
container,
config.delegate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export class NotificationsList extends Disposable {
// List
const listDelegate = this.listDelegate = new NotificationsListDelegate(this.listContainer);
const options = this.options;
const list = this.list = <WorkbenchList<INotificationViewItem>>this._register(this.instantiationService.createInstance(
WorkbenchList,
const list = this.list = this._register(this.instantiationService.createInstance(
WorkbenchList<INotificationViewItem>,
'NotificationsList',
this.listContainer,
listDelegate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ export class BulkEditPane extends ViewPane {
this._treeDataSource.groupByFile = this._storageService.getBoolean(BulkEditPane._memGroupByFile, StorageScope.PROFILE, true);
this._ctxGroupByFile.set(this._treeDataSource.groupByFile);

this._tree = <WorkbenchAsyncDataTree<BulkFileOperations, BulkEditElement, FuzzyScore>>this._instaService.createInstance(
WorkbenchAsyncDataTree, this.id, treeContainer,
this._tree = this._instaService.createInstance(
WorkbenchAsyncDataTree<BulkFileOperations, BulkEditElement, FuzzyScore>, this.id, treeContainer,
new BulkEditDelegate(),
[this._instaService.createInstance(TextEditElementRenderer), this._instaService.createInstance(FileElementRenderer, resourceLabels), this._instaService.createInstance(CategoryElementRenderer)],
this._treeDataSource,
Expand Down
7 changes: 4 additions & 3 deletions src/vs/workbench/contrib/chat/browser/chatWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { disposableTimeout, timeout } from '../../../../base/common/async.js';
import { Codicon } from '../../../../base/common/codicons.js';
import { toErrorMessage } from '../../../../base/common/errorMessage.js';
import { Emitter, Event } from '../../../../base/common/event.js';
import { FuzzyScore } from '../../../../base/common/filters.js';
import { MarkdownString } from '../../../../base/common/htmlContent.js';
import { Disposable, DisposableStore, IDisposable, MutableDisposable, combinedDisposable, toDisposable } from '../../../../base/common/lifecycle.js';
import { ResourceSet } from '../../../../base/common/map.js';
Expand Down Expand Up @@ -133,7 +134,7 @@ export class ChatWidget extends Disposable implements IChatWidget {

private contribs: ReadonlyArray<IChatWidgetContrib> = [];

private tree!: WorkbenchObjectTree<ChatTreeItem>;
private tree!: WorkbenchObjectTree<ChatTreeItem, FuzzyScore>;
private renderer!: ChatListItemRenderer;
private readonly _codeBlockModelCollection: CodeBlockModelCollection;
private lastItem: ChatTreeItem | undefined;
Expand Down Expand Up @@ -652,8 +653,8 @@ export class ChatWidget extends Disposable implements IChatWidget {
}
}));

this.tree = this._register(<WorkbenchObjectTree<ChatTreeItem>>scopedInstantiationService.createInstance(
WorkbenchObjectTree,
this.tree = this._register(scopedInstantiationService.createInstance(
WorkbenchObjectTree<ChatTreeItem, FuzzyScore>,
'Chat',
listContainer,
delegate,
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/debug/browser/callStackView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ export class CallStackView extends ViewPane {
const treeContainer = renderViewTree(container);

this.dataSource = new CallStackDataSource(this.debugService);
this.tree = <WorkbenchCompressibleAsyncDataTree<IDebugModel, CallStackItem, FuzzyScore>>this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'CallStackView', treeContainer, new CallStackDelegate(), new CallStackCompressionDelegate(this.debugService), [
this.tree = this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree<IDebugModel, CallStackItem, FuzzyScore>, 'CallStackView', treeContainer, new CallStackDelegate(), new CallStackCompressionDelegate(this.debugService), [
this.instantiationService.createInstance(SessionsRenderer),
this.instantiationService.createInstance(ThreadsRenderer),
this.instantiationService.createInstance(StackFramesRenderer),
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/debug/browser/debugHover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class DebugHoverWidget implements IContentWidget {
const tip = dom.append(this.complexValueContainer, $('.tip'));
tip.textContent = nls.localize({ key: 'quickTip', comment: ['"switch to editor language hover" means to show the programming language hover widget instead of the debug hover'] }, 'Hold {0} key to switch to editor language hover', isMacintosh ? 'Option' : 'Alt');
const dataSource = this.instantiationService.createInstance(DebugHoverDataSource);
this.tree = <WorkbenchAsyncDataTree<IExpression, IExpression, any>>this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'DebugHover', this.treeContainer, new DebugHoverDelegate(), [
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree<IExpression, IExpression, any>, 'DebugHover', this.treeContainer, new DebugHoverDelegate(), [
this.instantiationService.createInstance(VariablesRenderer, this.expressionRenderer),
this.instantiationService.createInstance(VisualizedVariableRenderer, this.expressionRenderer),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ export class LoadedScriptsView extends ViewPane {
this.treeLabels = this.instantiationService.createInstance(ResourceLabels, { onDidChangeVisibility: this.onDidChangeBodyVisibility });
this._register(this.treeLabels);

this.tree = <WorkbenchCompressibleObjectTree<LoadedScriptsItem, FuzzyScore>>this.instantiationService.createInstance(WorkbenchCompressibleObjectTree,
this.tree = this.instantiationService.createInstance(WorkbenchCompressibleObjectTree<LoadedScriptsItem, FuzzyScore>,
'LoadedScriptsView',
this.treeContainer,
new LoadedScriptsDelegate(),
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/contrib/debug/browser/repl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ export class Repl extends FilterViewPane implements IHistoryNavigationWidget {
const expressionRenderer = this.instantiationService.createInstance(DebugExpressionRenderer);
this.replDataSource = new ReplDataSource();

const tree = this.tree = <WorkbenchAsyncDataTree<IDebugSession, IReplElement, FuzzyScore>>this.instantiationService.createInstance(
WorkbenchAsyncDataTree,
const tree = this.tree = this.instantiationService.createInstance(
WorkbenchAsyncDataTree<IDebugSession, IReplElement, FuzzyScore>,
'DebugRepl',
this.treeContainer,
this.replDelegate,
Expand Down
6 changes: 3 additions & 3 deletions src/vs/workbench/contrib/debug/browser/replFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { matchesFuzzy } from '../../../../base/common/filters.js';
import { FuzzyScore, matchesFuzzy } from '../../../../base/common/filters.js';
import { splitGlobAware } from '../../../../base/common/glob.js';
import { ITreeFilter, TreeVisibility, TreeFilterResult } from '../../../../base/browser/ui/tree/tree.js';
import { IReplElement } from '../common/debug.js';
Expand All @@ -16,7 +16,7 @@ type ParsedQuery = {
query: string;
};

export class ReplFilter implements ITreeFilter<IReplElement> {
export class ReplFilter implements ITreeFilter<IReplElement, FuzzyScore> {

static matchQuery = matchesFuzzy;

Expand All @@ -39,7 +39,7 @@ export class ReplFilter implements ITreeFilter<IReplElement> {
}
}

filter(element: IReplElement, parentVisibility: TreeVisibility): TreeFilterResult<void> {
filter(element: IReplElement, parentVisibility: TreeVisibility): TreeFilterResult<FuzzyScore> {
if (element instanceof ReplEvaluationInput || element instanceof ReplEvaluationResult || element instanceof Variable) {
// Only filter the output events, everything else is visible https://github.com/microsoft/vscode/issues/105863
return TreeVisibility.Visible;
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/debug/browser/variablesView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class VariablesView extends ViewPane {
container.classList.add('debug-variables');
const treeContainer = renderViewTree(container);
const expressionRenderer = this.instantiationService.createInstance(DebugExpressionRenderer);
this.tree = <WorkbenchAsyncDataTree<IStackFrame | null, IExpression | IScope, FuzzyScore>>this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'VariablesView', treeContainer, new VariablesDelegate(),
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree<IStackFrame | null, IExpression | IScope, FuzzyScore>, 'VariablesView', treeContainer, new VariablesDelegate(),
[
this.instantiationService.createInstance(VariablesRenderer, expressionRenderer),
this.instantiationService.createInstance(VisualizedVariableRenderer, expressionRenderer),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class WatchExpressionsView extends ViewPane {
const treeContainer = renderViewTree(container);

const expressionsRenderer = this.instantiationService.createInstance(WatchExpressionsRenderer, this.expressionRenderer);
this.tree = <WorkbenchAsyncDataTree<IDebugService | IExpression, IExpression, FuzzyScore>>this.instantiationService.createInstance(WorkbenchAsyncDataTree, 'WatchExpressions', treeContainer, new WatchExpressionsDelegate(),
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree<IDebugService | IExpression, IExpression, FuzzyScore>, 'WatchExpressions', treeContainer, new WatchExpressionsDelegate(),
[
expressionsRenderer,
this.instantiationService.createInstance(VariablesRenderer, this.expressionRenderer),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ export abstract class AbstractRuntimeExtensionsEditor extends EditorPane {
}
};

this._list = <WorkbenchList<IRuntimeExtension>>this._instantiationService.createInstance(WorkbenchList,
this._list = this._instantiationService.createInstance(WorkbenchList<IRuntimeExtension>,
'RuntimeExtensions',
parent, delegate, [renderer], {
multipleSelectionSupport: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ export class ExplorerView extends ViewPane implements IExplorerView {

const getFileNestingSettings = (item?: ExplorerItem) => this.configurationService.getValue<IFilesConfiguration>({ resource: item?.root.resource }).explorer.fileNesting;

this.tree = <WorkbenchCompressibleAsyncDataTree<ExplorerItem | ExplorerItem[], ExplorerItem, FuzzyScore>>this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree, 'FileExplorer', container, new ExplorerDelegate(), new ExplorerCompressionDelegate(), [this.renderer],
this.tree = this.instantiationService.createInstance(WorkbenchCompressibleAsyncDataTree<ExplorerItem | ExplorerItem[], ExplorerItem, FuzzyScore>, 'FileExplorer', container, new ExplorerDelegate(), new ExplorerCompressionDelegate(), [this.renderer],
this.instantiationService.createInstance(ExplorerDataSource, this.filter, this.findProvider), {
compressionEnabled: isCompressionEnabled(),
accessibilityProvider: this.renderer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ export class NotebookVariablesView extends ViewPane {
super.renderBody(container);
this.element.classList.add('debug-pane');

this.tree = <WorkbenchAsyncDataTree<INotebookScope | IEmptyScope, INotebookVariableElement>>this.instantiationService.createInstance(
WorkbenchAsyncDataTree,
this.tree = this.instantiationService.createInstance(
WorkbenchAsyncDataTree<INotebookScope | IEmptyScope, INotebookVariableElement>,
'notebookVariablesTree',
container,
new NotebookVariablesDelegate(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ class NotebookModelReferenceCollection extends ReferenceCollection<Promise<IReso
let workingCopyManager = this._workingCopyManagers.get(workingCopyTypeId);
if (!workingCopyManager) {
const factory = new NotebookFileWorkingCopyModelFactory(notebookType, this._notebookService, this._configurationService, this._telemetryService, this._notebookLoggingService);
workingCopyManager = <IFileWorkingCopyManager<NotebookFileWorkingCopyModel, NotebookFileWorkingCopyModel>><any>this._instantiationService.createInstance(
FileWorkingCopyManager,
workingCopyManager = this._instantiationService.createInstance(
FileWorkingCopyManager<NotebookFileWorkingCopyModel, NotebookFileWorkingCopyModel>,
workingCopyTypeId,
factory,
factory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ class EditSettingRenderer extends Disposable {
) {
super();

this.editPreferenceWidgetForCursorPosition = <EditPreferenceWidget<IIndexedSetting>>this._register(this.instantiationService.createInstance(EditPreferenceWidget, editor));
this.editPreferenceWidgetForMouseMove = <EditPreferenceWidget<IIndexedSetting>>this._register(this.instantiationService.createInstance(EditPreferenceWidget, editor));
this.editPreferenceWidgetForCursorPosition = this._register(this.instantiationService.createInstance(EditPreferenceWidget<IIndexedSetting>, editor));
this.editPreferenceWidgetForMouseMove = this._register(this.instantiationService.createInstance(EditPreferenceWidget<IIndexedSetting>, editor));
this.toggleEditPreferencesForMouseMoveDelayer = new Delayer<void>(75);

this._register(this.editPreferenceWidgetForCursorPosition.onClick(e => this.onEditSettingClicked(this.editPreferenceWidgetForCursorPosition, e)));
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/remote/browser/remote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ class HelpPanel extends ViewPane {
treeContainer.classList.add('remote-help-content');
container.appendChild(treeContainer);

this.tree = <WorkbenchAsyncDataTree<HelpModel, IHelpItem, IHelpItem>>this.instantiationService.createInstance(WorkbenchAsyncDataTree,
this.tree = this.instantiationService.createInstance(WorkbenchAsyncDataTree<HelpModel, IHelpItem, IHelpItem>,
'RemoteHelp',
treeContainer,
new HelpTreeVirtualDelegate(),
Expand Down
4 changes: 2 additions & 2 deletions src/vs/workbench/contrib/testing/browser/testCoverageView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ class TestCoverageTree extends Disposable {
) {
super();

this.tree = <WorkbenchCompressibleObjectTree<CoverageTreeElement, void>>instantiationService.createInstance(
WorkbenchCompressibleObjectTree,
this.tree = instantiationService.createInstance(
WorkbenchCompressibleObjectTree<CoverageTreeElement, void>,
'TestCoverageView',
container,
new TestCoverageTreeListDelegate(),
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/timeline/browser/timelinePane.ts
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ export class TimelinePane extends ViewPane {
}
});

this.tree = <WorkbenchObjectTree<TreeElement, FuzzyScore>>this.instantiationService.createInstance(WorkbenchObjectTree, 'TimelinePane',
this.tree = this.instantiationService.createInstance(WorkbenchObjectTree<TreeElement, FuzzyScore>, 'TimelinePane',
this.$tree, new TimelineListVirtualDelegate(), [this.treeRenderer], {
identityProvider: new TimelineIdentityProvider(),
accessibilityProvider: {
Expand Down