@@ -14,13 +14,15 @@ import { applyZoom, zoomIn, zoomOut } from 'vs/platform/windows/electron-sandbox
14
14
import { IContextMenuItem } from 'vs/base/parts/contextmenu/common/contextmenu' ;
15
15
import { popup } from 'vs/base/parts/contextmenu/electron-sandbox/contextmenu' ;
16
16
import { ProcessItem } from 'vs/base/common/processes' ;
17
- import { append , $ } from 'vs/base/browser/dom' ;
17
+ import { append , $ , createStyleSheet } from 'vs/base/browser/dom' ;
18
18
import { isRemoteDiagnosticError , IRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnostics' ;
19
19
import { ElectronIPCMainProcessService } from 'vs/platform/ipc/electron-sandbox/mainProcessService' ;
20
20
import { ByteSize } from 'vs/platform/files/common/files' ;
21
21
import { IListVirtualDelegate } from 'vs/base/browser/ui/list/list' ;
22
22
import { IDataSource , ITreeNode , ITreeRenderer } from 'vs/base/browser/ui/tree/tree' ;
23
23
import { DataTree } from 'vs/base/browser/ui/tree/dataTree' ;
24
+ import { getIconsStyleSheet } from 'vs/platform/theme/browser/iconsStyleSheet' ;
25
+ import { RunOnceScheduler } from 'vs/base/common/async' ;
24
26
25
27
const DEBUG_FLAGS_PATTERN = / \s - - ( i n s p e c t | d e b u g ) ( - b r k | p o r t ) ? = ( \d + ) ? / ;
26
28
const DEBUG_PORT_PATTERN = / \s - - ( i n s p e c t | d e b u g ) - p o r t = ( \d + ) / ;
@@ -310,8 +312,7 @@ class ProcessExplorer {
310
312
renderers ,
311
313
new ProcessTreeDataSource ( ) ,
312
314
{
313
- identityProvider :
314
- {
315
+ identityProvider : {
315
316
getId : ( element : ProcessTree | ProcessItem | MachineProcessInformation | ProcessInformation | IRemoteDiagnosticError ) => {
316
317
if ( isProcessItem ( element ) ) {
317
318
return element . pid . toString ( ) ;
@@ -331,7 +332,7 @@ class ProcessExplorer {
331
332
332
333
return 'header' ;
333
334
}
334
- }
335
+ } ,
335
336
} ) ;
336
337
337
338
this . tree . setInput ( { processes : { processRoots } } ) ;
@@ -475,9 +476,24 @@ class ProcessExplorer {
475
476
}
476
477
}
477
478
479
+ function createCodiconStyleSheet ( ) {
480
+ const codiconStyleSheet = createStyleSheet ( ) ;
481
+ codiconStyleSheet . id = 'codiconStyles' ;
482
+
483
+ const iconsStyleSheet = getIconsStyleSheet ( ) ;
484
+ function updateAll ( ) {
485
+ codiconStyleSheet . textContent = iconsStyleSheet . getCSS ( ) ;
486
+ }
487
+
488
+ const delayer = new RunOnceScheduler ( updateAll , 0 ) ;
489
+ iconsStyleSheet . onDidChange ( ( ) => delayer . schedule ( ) ) ;
490
+ delayer . schedule ( ) ;
491
+ }
492
+
478
493
export function startup ( configuration : ProcessExplorerWindowConfiguration ) : void {
479
494
const platformClass = configuration . data . platform === 'win32' ? 'windows' : configuration . data . platform === 'linux' ? 'linux' : 'mac' ;
480
495
document . body . classList . add ( platformClass ) ; // used by our fonts
496
+ createCodiconStyleSheet ( ) ;
481
497
applyZoom ( configuration . data . zoomLevel ) ;
482
498
483
499
new ProcessExplorer ( configuration . windowId , configuration . data ) ;
0 commit comments