src/vs/editor/contrib/stickyScroll/browser/stickyScrollProvider.ts/StickyLineCandidateProvider/updateOutlineModel
class StickyLineCandidateProvider:	private async updateOutlineModel(token: CancellationToken): Promise<void> {
		if (!this._editor.hasModel()) {
			return;
		}

		const model = this._editor.getModel();
		const modelVersionId = model.getVersionId();
		const isDifferentModel = this._model ? !isEqual(this._model.uri, model.uri) : false;

		// clear sticky scroll to not show stale data for too long
		const resetHandle = isDifferentModel ? setTimeout(() => {
			if (!token.isCancellationRequested) {
				this._model = new StickyOutlineModel(model.uri, model.getVersionId(), undefined, undefined);
				this._onDidChangeStickyScroll.fire();
			}
		}, 75) : undefined;

		// get elements from outline or folding model
		const outlineModel = await OutlineModel.create(this._languageFeaturesService.documentSymbolProvider, model, token);
		if (token.isCancellationRequested) {
			return;
		}
		if (outlineModel.children.size !== 0) {
			const { stickyOutlineElement, providerID } = StickyOutlineElement.fromOutlineModel(outlineModel, this._model?.outlineProviderId);
			this._model = new StickyOutlineModel(model.uri, modelVersionId, stickyOutlineElement, providerID);

		} else {
			const foldingController = FoldingController.get(this._editor);
			const foldingModel = await foldingController?.getFoldingModel();
			if (token.isCancellationRequested) {
				return;
			}
			if (foldingModel && foldingModel.regions.length !== 0) {
				const foldingElement = StickyOutlineElement.fromFoldingModel(foldingModel);
				this._model = new StickyOutlineModel(model.uri, modelVersionId, foldingElement, undefined);
			} else {
				this._model = undefined;
			}
		}
		clearTimeout(resetHandle);
	}