MCPcopy Create free account
hub / github.com/DTStack/molecule / loadContributes

Method loadContributes

src/services/extensionService.ts:185–201  ·  view source on GitHub ↗
(contributes: IContribute)

Source from the content-addressed store, hash-verified

183 }
184
185 public loadContributes(contributes: IContribute) {
186 const contributeKeys = Object.keys(contributes);
187 contributeKeys.forEach((type: string) => {
188 switch (type) {
189 case IContributeType.Themes: {
190 const themes: IColorTheme[] | undefined = contributes[type];
191 if (!themes) return;
192 return this.colorThemeService.addThemes(themes);
193 }
194 case IContributeType.Languages: {
195 const locales: ILocale[] | undefined = contributes[type];
196 if (!locales) return;
197 return this.localeService.addLocales(locales);
198 }
199 }
200 });
201 }
202
203 public registerAction(ActionClass: { new (): Action2 }): IDisposable {
204 return registerAction2(ActionClass);

Callers 2

activateMethod · 0.95

Calls 2

addThemesMethod · 0.65
addLocalesMethod · 0.65

Tested by

no test coverage detected