66import { URI } from 'vs/base/common/uri' ;
77import { dirname , isEqual , basenameOrAuthority } from 'vs/base/common/resources' ;
88import { IconLabel , IIconLabelValueOptions , IIconLabelCreationOptions } from 'vs/base/browser/ui/iconLabel/iconLabel' ;
9- import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions' ;
109import { IModeService } from 'vs/editor/common/services/modeService' ;
1110import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace' ;
1211import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
@@ -82,9 +81,9 @@ export class ResourceLabels extends Disposable {
8281 constructor (
8382 container : IResourceLabelsContainer ,
8483 @IInstantiationService private readonly instantiationService : IInstantiationService ,
85- @IExtensionService private readonly extensionService : IExtensionService ,
8684 @IConfigurationService private readonly configurationService : IConfigurationService ,
8785 @IModelService private readonly modelService : IModelService ,
86+ @IModeService private readonly modeService : IModeService ,
8887 @IDecorationsService private readonly decorationsService : IDecorationsService ,
8988 @IThemeService private readonly themeService : IThemeService ,
9089 @ILabelService private readonly labelService : ILabelService ,
@@ -103,7 +102,7 @@ export class ResourceLabels extends Disposable {
103102 } ) ) ;
104103
105104 // notify when extensions are registered with potentially new languages
106- this . _register ( this . extensionService . onDidRegisterExtensions ( ( ) => this . _widgets . forEach ( widget => widget . notifyExtensionsRegistered ( ) ) ) ) ;
105+ this . _register ( this . modeService . onLanguagesMaybeChanged ( ( ) => this . _widgets . forEach ( widget => widget . notifyExtensionsRegistered ( ) ) ) ) ;
107106
108107 // notify when model mode changes
109108 this . _register ( this . modelService . onModelModeChanged ( e => {
@@ -206,15 +205,15 @@ export class ResourceLabel extends ResourceLabels {
206205 container : HTMLElement ,
207206 options : IIconLabelCreationOptions | undefined ,
208207 @IInstantiationService instantiationService : IInstantiationService ,
209- @IExtensionService extensionService : IExtensionService ,
210208 @IConfigurationService configurationService : IConfigurationService ,
211209 @IModelService modelService : IModelService ,
210+ @IModelService modeService : IModeService ,
212211 @IDecorationsService decorationsService : IDecorationsService ,
213212 @IThemeService themeService : IThemeService ,
214213 @ILabelService labelService : ILabelService ,
215214 @ITextFileService textFileService : ITextFileService
216215 ) {
217- super ( DEFAULT_LABELS_CONTAINER , instantiationService , extensionService , configurationService , modelService , decorationsService , themeService , labelService , textFileService ) ;
216+ super ( DEFAULT_LABELS_CONTAINER , instantiationService , configurationService , modelService , modeService , decorationsService , themeService , labelService , textFileService ) ;
218217
219218 this . _label = this . _register ( this . create ( container , options ) ) ;
220219 }
0 commit comments