mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 08:38:56 +01:00
Forward SemanticColoring disposals to the ext host
This commit is contained in:
@@ -633,6 +633,7 @@ class SemanticColoringAdapter {
|
||||
|
||||
const previousResult = (previousSemanticColoringResultId !== 0 ? this._previousResults.get(previousSemanticColoringResultId) : null);
|
||||
if (previousResult) {
|
||||
this._previousResults.delete(previousSemanticColoringResultId);
|
||||
return this._deltaEncode(previousResult, value);
|
||||
}
|
||||
|
||||
@@ -640,6 +641,10 @@ class SemanticColoringAdapter {
|
||||
});
|
||||
}
|
||||
|
||||
async releaseSemanticColoring(semanticColoringResultId: number): Promise<void> {
|
||||
this._previousResults.delete(semanticColoringResultId);
|
||||
}
|
||||
|
||||
private _deltaEncode(previousResult: vscode.SemanticColoring, currentResult: vscode.SemanticColoring): VSBuffer {
|
||||
console.log(previousResult);
|
||||
console.log(currentResult);
|
||||
@@ -1542,6 +1547,10 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
return this._withAdapter(handle, SemanticColoringAdapter, adapter => adapter.provideSemanticColoring(URI.revive(resource), previousSemanticColoringResultId, token), null);
|
||||
}
|
||||
|
||||
$releaseSemanticColoring(handle: number, semanticColoringResultId: number): void {
|
||||
this._withAdapter(handle, SemanticColoringAdapter, adapter => adapter.releaseSemanticColoring(semanticColoringResultId), undefined);
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
// --- suggestion
|
||||
|
||||
Reference in New Issue
Block a user