3
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
4
*--------------------------------------------------------------------------------------------*/
5
5
6
- import * as nls from '../../../../nls.js' ;
7
- import { IViewletViewOptions } from '../../../browser/parts/views/viewsViewlet.js' ;
8
- import { normalize , isAbsolute , posix } from '../../../../base/common/path.js' ;
9
- import { ViewPane , ViewAction } from '../../../browser/parts/views/viewPane.js' ;
10
- import { IInstantiationService , ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js' ;
11
- import { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js' ;
12
- import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js' ;
13
- import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js' ;
14
- import { renderViewTree } from './baseDebugView.js' ;
15
- import { IDebugSession , IDebugService , CONTEXT_LOADED_SCRIPTS_ITEM_TYPE , LOADED_SCRIPTS_VIEW_ID } from '../common/debug.js' ;
16
- import { Source } from '../common/debugSource.js' ;
17
- import { IWorkspaceContextService , IWorkspaceFolder } from '../../../../platform/workspace/common/workspace.js' ;
18
- import { IContextKey , IContextKeyService , ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js' ;
19
- import { normalizeDriveLetter , tildify } from '../../../../base/common/labels.js' ;
20
- import { isWindows } from '../../../../base/common/platform.js' ;
21
- import { URI } from '../../../../base/common/uri.js' ;
22
- import { ltrim } from '../../../../base/common/strings.js' ;
23
- import { RunOnceScheduler } from '../../../../base/common/async.js' ;
24
- import { ResourceLabels , IResourceLabelProps , IResourceLabelOptions , IResourceLabel } from '../../../browser/labels.js' ;
25
- import { FileKind } from '../../../../platform/files/common/files.js' ;
26
6
import { IListVirtualDelegate } from '../../../../base/browser/ui/list/list.js' ;
27
- import { ITreeNode , ITreeFilter , TreeVisibility , TreeFilterResult , ITreeElement } from '../../../../base/browser/ui/tree/tree.js' ;
28
7
import { IListAccessibilityProvider } from '../../../../base/browser/ui/list/listWidget.js' ;
29
- import { IEditorService } from '../../../services/editor/common/editorService.js' ;
30
- import { WorkbenchCompressibleObjectTree } from '../../../../platform/list/browser/listService.js' ;
31
- import { dispose } from '../../../../base/common/lifecycle.js' ;
32
- import { createMatches , FuzzyScore } from '../../../../base/common/filters.js' ;
33
- import { DebugContentProvider } from '../common/debugContentProvider.js' ;
34
- import { ILabelService } from '../../../../platform/label/common/label.js' ;
8
+ import { TreeFindMode } from '../../../../base/browser/ui/tree/abstractTree.js' ;
35
9
import type { ICompressedTreeNode } from '../../../../base/browser/ui/tree/compressedObjectTreeModel.js' ;
36
10
import type { ICompressibleTreeRenderer } from '../../../../base/browser/ui/tree/objectTree.js' ;
37
- import { registerAction2 , MenuId } from '../../../../platform/actions/common/actions.js' ;
11
+ import { ITreeElement , ITreeFilter , ITreeNode , TreeFilterResult , TreeVisibility } from '../../../../base/browser/ui/tree/tree.js' ;
12
+ import { RunOnceScheduler } from '../../../../base/common/async.js' ;
38
13
import { Codicon } from '../../../../base/common/codicons.js' ;
39
-
40
- import { IViewDescriptorService } from '../../../common/views.js' ;
14
+ import { createMatches , FuzzyScore } from '../../../../base/common/filters.js' ;
15
+ import { normalizeDriveLetter , tildify } from '../../../../base/common/labels.js' ;
16
+ import { dispose } from '../../../../base/common/lifecycle.js' ;
17
+ import { isAbsolute , normalize , posix } from '../../../../base/common/path.js' ;
18
+ import { isWindows } from '../../../../base/common/platform.js' ;
19
+ import { ltrim } from '../../../../base/common/strings.js' ;
20
+ import { URI } from '../../../../base/common/uri.js' ;
21
+ import * as nls from '../../../../nls.js' ;
22
+ import { MenuId , registerAction2 } from '../../../../platform/actions/common/actions.js' ;
23
+ import { IConfigurationService } from '../../../../platform/configuration/common/configuration.js' ;
24
+ import { ContextKeyExpr , IContextKey , IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js' ;
25
+ import { IContextMenuService } from '../../../../platform/contextview/browser/contextView.js' ;
26
+ import { FileKind } from '../../../../platform/files/common/files.js' ;
27
+ import { IHoverService } from '../../../../platform/hover/browser/hover.js' ;
28
+ import { IInstantiationService , ServicesAccessor } from '../../../../platform/instantiation/common/instantiation.js' ;
29
+ import { IKeybindingService } from '../../../../platform/keybinding/common/keybinding.js' ;
30
+ import { ILabelService } from '../../../../platform/label/common/label.js' ;
31
+ import { WorkbenchCompressibleObjectTree } from '../../../../platform/list/browser/listService.js' ;
41
32
import { IOpenerService } from '../../../../platform/opener/common/opener.js' ;
42
- import { IThemeService } from '../../../../platform/theme/common/themeService.js' ;
43
33
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js' ;
34
+ import { IFileIconTheme , IThemeService } from '../../../../platform/theme/common/themeService.js' ;
35
+ import { IWorkspaceContextService , IWorkspaceFolder } from '../../../../platform/workspace/common/workspace.js' ;
36
+ import { IResourceLabel , IResourceLabelOptions , IResourceLabelProps , ResourceLabels } from '../../../browser/labels.js' ;
37
+ import { ViewAction , ViewPane } from '../../../browser/parts/views/viewPane.js' ;
38
+ import { IViewletViewOptions } from '../../../browser/parts/views/viewsViewlet.js' ;
39
+ import { IViewDescriptorService } from '../../../common/views.js' ;
40
+ import { IEditorService } from '../../../services/editor/common/editorService.js' ;
44
41
import { IPathService } from '../../../services/path/common/pathService.js' ;
45
- import { TreeFindMode } from '../../../../base/browser/ui/tree/abstractTree.js' ;
46
- import { IHoverService } from '../../../../platform/hover/browser/hover.js' ;
42
+ import { CONTEXT_LOADED_SCRIPTS_ITEM_TYPE , IDebugService , IDebugSession , LOADED_SCRIPTS_VIEW_ID } from '../common/debug.js' ;
43
+ import { DebugContentProvider } from '../common/debugContentProvider.js' ;
44
+ import { Source } from '../common/debugSource.js' ;
45
+ import { renderViewTree } from './baseDebugView.js' ;
47
46
48
47
const NEW_STYLE_COMPRESS = true ;
49
48
@@ -439,7 +438,7 @@ export class LoadedScriptsView extends ViewPane {
439
438
@IOpenerService openerService : IOpenerService ,
440
439
@IThemeService themeService : IThemeService ,
441
440
@ITelemetryService telemetryService : ITelemetryService ,
442
- @IHoverService hoverService : IHoverService
441
+ @IHoverService hoverService : IHoverService ,
443
442
) {
444
443
super ( options , keybindingService , contextMenuService , configurationService , contextKeyService , viewDescriptorService , instantiationService , openerService , themeService , telemetryService , hoverService ) ;
445
444
this . loadedScriptsItemType = CONTEXT_LOADED_SCRIPTS_ITEM_TYPE . bindTo ( contextKeyService ) ;
@@ -449,8 +448,7 @@ export class LoadedScriptsView extends ViewPane {
449
448
super . renderBody ( container ) ;
450
449
451
450
this . element . classList . add ( 'debug-pane' ) ;
452
- container . classList . add ( 'debug-loaded-scripts' ) ;
453
- container . classList . add ( 'show-file-icons' ) ;
451
+ container . classList . add ( 'debug-loaded-scripts' , 'show-file-icons' ) ;
454
452
455
453
this . treeContainer = renderViewTree ( container ) ;
456
454
@@ -461,6 +459,14 @@ export class LoadedScriptsView extends ViewPane {
461
459
this . treeLabels = this . instantiationService . createInstance ( ResourceLabels , { onDidChangeVisibility : this . onDidChangeBodyVisibility } ) ;
462
460
this . _register ( this . treeLabels ) ;
463
461
462
+ const onFileIconThemeChange = ( fileIconTheme : IFileIconTheme ) => {
463
+ this . treeContainer . classList . toggle ( 'align-icons-and-twisties' , fileIconTheme . hasFileIcons && ! fileIconTheme . hasFolderIcons ) ;
464
+ this . treeContainer . classList . toggle ( 'hide-arrows' , fileIconTheme . hidesExplorerArrows === true ) ;
465
+ } ;
466
+
467
+ this . _register ( this . themeService . onDidFileIconThemeChange ( onFileIconThemeChange ) ) ;
468
+ onFileIconThemeChange ( this . themeService . getFileIconTheme ( ) ) ;
469
+
464
470
this . tree = this . instantiationService . createInstance ( WorkbenchCompressibleObjectTree < LoadedScriptsItem , FuzzyScore > ,
465
471
'LoadedScriptsView' ,
466
472
this . treeContainer ,
0 commit comments