async resolve()

in src/references/model.ts [23:48]


	async resolve() {

		let model: ReferencesModel;
		if (this._result) {
			model = new ReferencesModel(this._result);
		} else {
			const resut = await Promise.resolve(vscode.commands.executeCommand<vscode.Location[] | vscode.LocationLink[]>(this._command, this.location.uri, this.location.range.start));
			model = new ReferencesModel(resut ?? []);
		}

		if (model.items.length === 0) {
			return;
		}

		const provider = new ReferencesTreeDataProvider(model);

		return {
			provider,
			get message() { return model.message; },
			navigation: model,
			highlights: model,
			dispose(): void {
				provider.dispose();
			}
		};
	}