@@ -57,6 +57,21 @@ class ClientStateNormalizer {
57
57
compiler . filters . demangle = component . componentState . filters . demangle ;
58
58
59
59
session . compilers . push ( compiler ) ;
60
+ } else if ( component . componentName === "executor" ) {
61
+ const session = this . normalized . findOrCreateSession ( component . componentState . source ) ;
62
+
63
+ const executor = new ClientState . Executor ( ) ;
64
+ executor . compiler . id = component . componentState . compiler ;
65
+ executor . compiler . options = component . componentState . options ;
66
+ executor . compiler . libs = component . componentState . libs ;
67
+ executor . compilerVisible = component . componentState . compilationPanelShown ;
68
+ executor . compilerOutputVisible = component . componentState . compilerOutShown ;
69
+ executor . arguments = component . componentState . execArgs ;
70
+ executor . argumentsVisible = component . componentState . argsPanelShown ;
71
+ executor . stdin = component . componentState . execStdin ;
72
+ executor . stdinVisible = component . componentState . stdinPanelShown ;
73
+
74
+ session . executors . push ( executor ) ;
60
75
} else if ( component . componentName === "ast" ) {
61
76
const session = this . normalized . findOrCreateSession ( component . componentState . editorid ) ;
62
77
const compiler = session . findOrCreateCompiler ( component . componentState . id ) ;
@@ -266,6 +281,30 @@ class ClientStateGoldenifier {
266
281
) ;
267
282
}
268
283
284
+ newExecutorStackFromSession ( session , executor , width ) {
285
+ return this . newStackWithOneComponent ( width ,
286
+ {
287
+ type : "component" ,
288
+ componentName : "executor" ,
289
+ componentState : {
290
+ compiler : executor . compiler . id ,
291
+ source : session . id ,
292
+ options : executor . compiler . options ,
293
+ execArgs : executor . arguments ,
294
+ execStdin : executor . stdin ,
295
+ libs : executor . compiler . libs ,
296
+ lang : session . language ,
297
+ compilationPanelShown : executor . compilerVisible ,
298
+ compilerOutShown : executor . compilerOutputVisible ,
299
+ argsPanelShown : executor . argumentsVisible ,
300
+ stdinPanelShown : executor . stdinVisible
301
+ } ,
302
+ isClosable : true ,
303
+ reorderEnabled : true
304
+ }
305
+ ) ;
306
+ }
307
+
269
308
newSpecialOutputStack ( viewtype , session , compiler , idxCompiler , compilerWidth ) {
270
309
let stack = null ;
271
310
if ( viewtype === "ast" ) {
@@ -354,8 +393,9 @@ class ClientStateGoldenifier {
354
393
this . golden . content [ 0 ] . content [ idxSession ] . content [ 0 ] . content . push ( stack ) ;
355
394
356
395
const compilerWidth = 100.0 /
357
- ( 1 + session . compilers . length + session . countNumberOfSpecialOutputsAndTools ( ) ) ;
358
-
396
+ ( 1 + session . compilers . length + session . executors . length +
397
+ session . countNumberOfSpecialOutputsAndTools ( ) ) ;
398
+
359
399
if ( session . conformanceview ) {
360
400
const stack = this . newConformanceViewStack ( session , compilerWidth , session . conformanceview ) ;
361
401
this . golden . content [ 0 ] . content [ idxSession ] . content [ 1 ] . content . push ( stack ) ;
@@ -380,6 +420,12 @@ class ClientStateGoldenifier {
380
420
this . golden . content [ 0 ] . content [ idxSession ] . content [ 1 ] . content . push ( stack ) ;
381
421
} ) ;
382
422
}
423
+
424
+ for ( let idxExecutor = 0 ; idxExecutor < session . executors . length ; idxExecutor ++ ) {
425
+ const executor = session . executors [ idxExecutor ] ;
426
+ let stack = this . newExecutorStackFromSession ( session , executor , compilerWidth ) ;
427
+ this . golden . content [ 0 ] . content [ idxSession ] . content [ 1 ] . content . push ( stack ) ;
428
+ }
383
429
}
384
430
} else if ( state . sessions . length === 1 ) {
385
431
const session = state . sessions [ 0 ] ;
@@ -389,7 +435,8 @@ class ClientStateGoldenifier {
389
435
]
390
436
} ;
391
437
392
- const width = 100.0 / ( 1 + session . compilers . length + session . countNumberOfSpecialOutputsAndTools ( ) ) ;
438
+ const width = 100.0 / ( 1 + session . compilers . length + session . executors . length +
439
+ session . countNumberOfSpecialOutputsAndTools ( ) ) ;
393
440
this . golden . content [ 0 ] . content . push ( this . newSourceStackFromSession ( session , width ) ) ;
394
441
395
442
if ( session . conformanceview ) {
@@ -416,6 +463,11 @@ class ClientStateGoldenifier {
416
463
this . golden . content [ 0 ] . content . push ( stack ) ;
417
464
} ) ;
418
465
}
466
+
467
+ session . executors . forEach ( ( executor ) => {
468
+ let stack = this . newExecutorStackFromSession ( session , executor , width ) ;
469
+ this . golden . content [ 0 ] . content . push ( stack ) ;
470
+ } ) ;
419
471
}
420
472
}
421
473
}
0 commit comments