(picker?: HTMLSelectElement | TomSelect, extraoptions?: DiffOption[])
| 350 | } |
| 351 | |
| 352 | getDiffableOptions(picker?: HTMLSelectElement | TomSelect, extraoptions?: DiffOption[]): any[] { |
| 353 | const options: DiffOption[] = [ |
| 354 | {id: DiffType.ASM.toString(), name: 'Assembly'}, |
| 355 | {id: DiffType.CompilerStdOut.toString(), name: 'Compiler stdout'}, |
| 356 | {id: DiffType.CompilerStdErr.toString(), name: 'Compiler stderr'}, |
| 357 | {id: DiffType.ExecStdOut.toString(), name: 'Execution stdout'}, |
| 358 | {id: DiffType.ExecStdErr.toString(), name: 'Execution stderr'}, |
| 359 | {id: DiffType.GNAT_ExpandedCode.toString(), name: 'GNAT Expanded Code'}, |
| 360 | {id: DiffType.GNAT_Tree.toString(), name: 'GNAT Tree Code'}, |
| 361 | ]; |
| 362 | |
| 363 | if (picker?.classList) { |
| 364 | if (picker.classList.contains('lhsdifftype')) { |
| 365 | if (this.lhs.difftype === DiffType.DeviceView && this.lhs.extraoption) { |
| 366 | options.push({ |
| 367 | id: encodeSelectizeValue({ |
| 368 | difftype: DiffType.DeviceView, |
| 369 | extraoption: this.lhs.extraoption, |
| 370 | }), |
| 371 | name: this.lhs.extraoption, |
| 372 | }); |
| 373 | } |
| 374 | } else { |
| 375 | if (this.rhs.difftype === DiffType.DeviceView && this.rhs.extraoption) { |
| 376 | options.push({ |
| 377 | id: encodeSelectizeValue({ |
| 378 | difftype: DiffType.DeviceView, |
| 379 | extraoption: this.rhs.extraoption, |
| 380 | }), |
| 381 | name: this.rhs.extraoption, |
| 382 | }); |
| 383 | } |
| 384 | } |
| 385 | } |
| 386 | |
| 387 | if (extraoptions) { |
| 388 | for (const option of extraoptions) { |
| 389 | if (!options.find(existing => existing.id === option.id)) options.push(option); |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | return options; |
| 394 | } |
| 395 | |
| 396 | override getInitialHTML() { |
| 397 | return $('#diff').html(); |
no test coverage detected