debt - change the implementation of vscode.languages.getLanguages to not send an IPC message but to read from a sync'd state which gets pushed into the exthost

This commit is contained in:
Johannes Rieken
2021-08-31 16:46:09 +02:00
parent 85a81276e8
commit db5aab03b6
4 changed files with 29 additions and 13 deletions

View File

@@ -423,7 +423,6 @@ export interface MainThreadLanguageFeaturesShape extends IDisposable {
}
export interface MainThreadLanguagesShape extends IDisposable {
$getLanguages(): Promise<string[]>;
$changeLanguage(resource: UriComponents, languageId: string): Promise<void>;
$tokensAtPosition(resource: UriComponents, position: IPosition): Promise<undefined | { type: modes.StandardTokenType, range: IRange }>;
$setLanguageStatus(handle: number, status: ILanguageStatus): void;
@@ -1374,6 +1373,10 @@ export interface ExtHostFileSystemEventServiceShape {
$onDidRunFileOperation(operation: files.FileOperation, files: readonly SourceTargetPair[]): void;
}
export interface ExtHostLanguagesShape {
$acceptLanguageIds(ids: string[]): void;
}
export interface ObjectIdentifier {
$ident?: number;
}
@@ -2252,6 +2255,7 @@ export const ExtHostContext = {
ExtHostFileSystem: createExtId<ExtHostFileSystemShape>('ExtHostFileSystem'),
ExtHostFileSystemInfo: createExtId<ExtHostFileSystemInfoShape>('ExtHostFileSystemInfo'),
ExtHostFileSystemEventService: createExtId<ExtHostFileSystemEventServiceShape>('ExtHostFileSystemEventService'),
ExtHostLanguages: createExtId<ExtHostLanguagesShape>('ExtHostLanguages'),
ExtHostLanguageFeatures: createExtId<ExtHostLanguageFeaturesShape>('ExtHostLanguageFeatures'),
ExtHostQuickOpen: createExtId<ExtHostQuickOpenShape>('ExtHostQuickOpen'),
ExtHostExtensionService: createExtId<ExtHostExtensionServiceShape>('ExtHostExtensionService'),