提交 9fa1a88b 编写于 作者: J Johannes Rieken

add explorer setting for file decorations

上级 88927c9b
......@@ -350,6 +350,11 @@ configurationRegistry.registerConfiguration({
nls.localize('sortOrder.modified', 'Files and folders are sorted by last modified date, in descending order. Folders are displayed before files.')
],
'description': nls.localize({ key: 'sortOrder', comment: ['This is the description for a setting. Values surrounded by single quotes are not to be translated.'] }, "Controls sorting order of files and folders in the explorer. In addition to the default sorting, you can set the order to 'mixed' (files and folders sorted combined), 'type' (by file type), 'modified' (by last modified date) or 'filesFirst' (sort files before folders).")
},
'explorer.enableFileDecorations': {
type: 'boolean',
description: nls.localize('enableFileDecorations', "Controls if the explorer should show file decorations, like SCM status or problems."),
default: true
}
}
});
\ No newline at end of file
});
......@@ -292,7 +292,8 @@ export class FileRenderer implements IRenderer {
state: FileViewletState,
@IContextViewService private contextViewService: IContextViewService,
@IInstantiationService private instantiationService: IInstantiationService,
@IThemeService private themeService: IThemeService
@IThemeService private themeService: IThemeService,
@IConfigurationService private configurationService: IConfigurationService
) {
this.state = state;
}
......@@ -329,7 +330,9 @@ export class FileRenderer implements IRenderer {
hidePath: true,
fileKind: stat.isRoot ? FileKind.ROOT_FOLDER : stat.isDirectory ? FileKind.FOLDER : FileKind.FILE,
extraClasses,
fileDecorations: stat.isDirectory ? 'all' : 'mine'
fileDecorations: this.configurationService.getConfiguration<IFilesConfiguration>().explorer.enableFileDecorations
? stat.isDirectory ? 'all' : 'mine'
: undefined
});
}
......
......@@ -71,6 +71,7 @@ export interface IFilesConfiguration extends IFilesConfiguration, IWorkbenchEdit
enableDragAndDrop: boolean;
confirmDelete: boolean;
sortOrder: SortOrder;
enableFileDecorations: boolean;
};
editor: IEditorOptions;
}
......@@ -178,4 +179,4 @@ export class FileOnDiskContentProvider implements ITextModelContentProvider {
public dispose(): void {
this.fileWatcher = dispose(this.fileWatcher);
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册