@@ -9,14 +9,13 @@ import { dirname, isEqual, basenameOrAuthority } from 'vs/base/common/resources'
99import { IconLabel , IIconLabelValueOptions , IIconLabelCreationOptions } from 'vs/base/browser/ui/iconLabel/iconLabel' ;
1010import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions' ;
1111import { IModeService } from 'vs/editor/common/services/modeService' ;
12- import { PLAINTEXT_MODE_ID } from 'vs/editor/common/modes/modesRegistry' ;
1312import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace' ;
1413import { IConfigurationService } from 'vs/platform/configuration/common/configuration' ;
1514import { IModelService } from 'vs/editor/common/services/modelService' ;
1615import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles' ;
1716import { IDecorationsService , IResourceDecorationChangeEvent } from 'vs/workbench/services/decorations/browser/decorations' ;
1817import { Schemas } from 'vs/base/common/network' ;
19- import { FileKind , FILES_ASSOCIATIONS_CONFIG , IFileService } from 'vs/platform/files/common/files' ;
18+ import { FileKind , FILES_ASSOCIATIONS_CONFIG } from 'vs/platform/files/common/files' ;
2019import { ITextModel } from 'vs/editor/common/model' ;
2120import { IThemeService } from 'vs/platform/theme/common/themeService' ;
2221import { Event , Emitter } from 'vs/base/common/event' ;
@@ -89,7 +88,6 @@ export class ResourceLabels extends Disposable {
8988 @IModelService private readonly modelService : IModelService ,
9089 @IDecorationsService private readonly decorationsService : IDecorationsService ,
9190 @IThemeService private readonly themeService : IThemeService ,
92- @IFileService private readonly fileService : IFileService ,
9391 @ILabelService private readonly labelService : ILabelService ,
9492 @ITextFileService private readonly textFileService : ITextFileService
9593 ) {
@@ -114,10 +112,6 @@ export class ResourceLabels extends Disposable {
114112 return ; // we need the resource to compare
115113 }
116114
117- if ( this . fileService . canHandleResource ( e . model . uri ) && e . oldModeId === PLAINTEXT_MODE_ID ) {
118- return ; // ignore transitions in files from no mode to specific mode because this happens each time a model is created
119- }
120-
121115 this . _widgets . forEach ( widget => widget . notifyModelModeChanged ( e . model ) ) ;
122116 } ) ) ;
123117
@@ -218,11 +212,10 @@ export class ResourceLabel extends ResourceLabels {
218212 @IModelService modelService : IModelService ,
219213 @IDecorationsService decorationsService : IDecorationsService ,
220214 @IThemeService themeService : IThemeService ,
221- @IFileService fileService : IFileService ,
222215 @ILabelService labelService : ILabelService ,
223216 @ITextFileService textFileService : ITextFileService
224217 ) {
225- super ( DEFAULT_LABELS_CONTAINER , instantiationService , extensionService , configurationService , modelService , decorationsService , themeService , fileService , labelService , textFileService ) ;
218+ super ( DEFAULT_LABELS_CONTAINER , instantiationService , extensionService , configurationService , modelService , decorationsService , themeService , labelService , textFileService ) ;
226219
227220 this . _label = this . _register ( this . create ( container , options ) ) ;
228221 }
0 commit comments