447
448
constructor(
449
>
private readonly _tokenizerWithStateStore: TokenizerWithStateStoreAndTextModel,
textModelTokens.ts
450
>
private readonly _backgroundTokenStore: IBackgroundTokenizationStore,
451
>
) {
452
>
}
453
>
454
>
public dispose(): void {
455
>
this._isDisposed = true;
456
>
}
457
>
458
>
public handleChanges(): void {
459
>
this._beginBackgroundTokenization();
460
>
}
461
>
462
>
private _isScheduled = false;
463
private _beginBackgroundTokenization(): void {
464
>
if (this._isScheduled || !this._tokenizerWithStateStore._textModel.isAttachedToEditor() || !this._hasLinesToTokenize()) {
textModelTokens.ts
465
>
return;
466
>
}
467
468
this._isScheduled = true;