editorReplacer -> editorOverride (#16041)

* editorReplacer -> editorOverride

* Update lifecycle phsae

* add back input factories

* Add comment

* add back tests

* comments

* fix log

* comments
This commit is contained in:
Charles Gagnon
2021-07-09 08:46:50 -07:00
committed by GitHub
parent 7ba0e49673
commit 8f202d91b6
19 changed files with 253 additions and 509 deletions

View File

@@ -25,6 +25,10 @@ type ILanguageAssociationSignature<Services extends BrandedService[]> = new (...
export interface ILanguageAssociationRegistry {
registerLanguageAssociation<Services extends BrandedService[]>(languages: string[], contribution: ILanguageAssociationSignature<Services>, isDefault?: boolean): IDisposable;
/**
* Gets the registered association for a language if one is registered
* @param language The case-insensitive language ID to get the association for
*/
getAssociationForLanguage(language: string): ILanguageAssociation | undefined;
readonly defaultAssociation: [string, ILanguageAssociation] | undefined;
@@ -54,6 +58,7 @@ const languageAssociationRegistry = new class implements ILanguageAssociationReg
}
registerLanguageAssociation(languages: string[], contribution: ILanguageAssociationSignature<BrandedService[]>, isDefault?: boolean): IDisposable {
languages = languages.map(lang => lang.toLowerCase());
for (const language of languages) {
this.associationContructors.set(language, contribution);
}
@@ -71,7 +76,7 @@ const languageAssociationRegistry = new class implements ILanguageAssociationReg
}
getAssociationForLanguage(language: string): ILanguageAssociation | undefined {
return this.associationsInstances.get(language);
return this.associationsInstances.get(language.toLowerCase());
}
get defaultAssociation(): [string, ILanguageAssociation] | undefined {