diff --git a/ivette/src/frama-c/plugins/eva/probeinfos.tsx b/ivette/src/frama-c/plugins/eva/probeinfos.tsx index ed7a18124c7db2fea83441d9059b7ea9fe193611..9baa4c9acdb5fc6ee9a3291fbee5eacd8d73f385 100644 --- a/ivette/src/frama-c/plugins/eva/probeinfos.tsx +++ b/ivette/src/frama-c/plugins/eva/probeinfos.tsx @@ -27,7 +27,7 @@ // React & Dome import React from 'react'; import { Hpack, Filler } from 'dome/layout/boxes'; -import { Label, Code } from 'dome/controls/labels'; +import { Code } from 'dome/controls/labels'; import { IconButton } from 'dome/controls/buttons'; import { ButtonGroup, Button } from 'dome/frame/toolbars'; @@ -48,7 +48,6 @@ function ProbeEditor(props: ModelProp): JSX.Element | null { const { model } = props; const probe = model.getFocused(); if (!probe || !probe.code) return null; - const { label } = probe; const { code } = probe; const { stmt, marker } = probe; const { cols, rows } = sizeof(code); @@ -57,11 +56,6 @@ function ProbeEditor(props: ModelProp): JSX.Element | null { const { zoomable } = probe; return ( <> - <Label - display={label !== code} - className="eva-probeinfo-label"> - {label} - </Label> <div className="eva-probeinfo-code"> <SizedArea cols={cols} rows={rows}>{code}</SizedArea> </div> diff --git a/ivette/src/frama-c/plugins/eva/probes.ts b/ivette/src/frama-c/plugins/eva/probes.ts index f39a671bec9a861d980132e3af8012a26b8b1e24..e9bdb0da9ca7d49f0887b03e57d475913505cfe2 100644 --- a/ivette/src/frama-c/plugins/eva/probes.ts +++ b/ivette/src/frama-c/plugins/eva/probes.ts @@ -33,31 +33,10 @@ import * as Ast from 'frama-c/kernel/api/ast'; import { ModelCallbacks } from './cells'; /* --------------------------------------------------------------------------*/ -/* --- Probe Labelling ---*/ +/* --- Probe State ---*/ /* --------------------------------------------------------------------------*/ -const Ka = 'A'.charCodeAt(0); -const Kz = 'Z'.charCodeAt(0); const LabelSize = 12; -let La = Ka; -let Lk = 0; - -function newLabel(): string { - const a = La; - const k = Lk; - const lbl = String.fromCharCode(a); - if (a < Kz) { - La++; - } else { - La = Ka; - Lk++; - } - return k > 0 ? `${lbl}${k}` : lbl; -} - -/* --------------------------------------------------------------------------*/ -/* --- Probe State ---*/ -/* --------------------------------------------------------------------------*/ export class Probe { @@ -69,7 +48,6 @@ export class Probe { prev?: Probe; transient = true; loading = true; - label?: string; code?: string; stmt?: Ast.marker; rank?: number; @@ -89,27 +67,20 @@ export class Probe { requestProbeInfo(): void { this.loading = true; - this.label = '…'; Server .send(Values.getProbeInfo, this.marker) .then(({ code, stmt, rank, effects, condition }) => { this.code = code; this.stmt = stmt; this.rank = rank; - this.label = undefined; this.effects = effects; this.condition = condition; this.loading = false; - if (code && code.length > LabelSize) - this.label = newLabel(); - else - this.label = code; }) .catch(() => { this.code = '(error)'; this.stmt = undefined; this.rank = undefined; - this.label = undefined; this.effects = false; this.condition = false; this.loading = false; diff --git a/ivette/src/frama-c/plugins/eva/valuetable.tsx b/ivette/src/frama-c/plugins/eva/valuetable.tsx index ce10beec388ade1eb101860806d84e5487f6beee..3e09f9d2c5467581d8e64c430c858b864870b2d6 100644 --- a/ivette/src/frama-c/plugins/eva/valuetable.tsx +++ b/ivette/src/frama-c/plugins/eva/valuetable.tsx @@ -101,11 +101,10 @@ function TableCell(props: TableCellProps) { // ---- Probe Contents case 'probes': { - const { stmt, code, label } = probe; - const textClass = label ? 'dome-text-label' : 'dome-text-cell'; + const { stmt, code } = probe; contents = ( <> - <span className={textClass}>{label ?? code}</span> + <span className='dome-text-cell'>{code}</span> <Stmt stmt={stmt} marker={marker} short /> </> );