applyElementNesting

fun applyElementNesting(graph: Vista, element: Element?): Vista

Outermost compound layer (issue 17 batch D / issue 24 multi-level boxing). Adds an ElementView for the analysed highway element and reparents every top-level code box (no existing parent) under it, so the cytoscape compound chain becomes Element → … → Instruction. SVG / sigma exporters ignore the parent link.

No-op when element is null — used by the diagram pipeline whenever the analysed element isn't known (matrix tests, ad-hoc analyzer runs). When the P7 task supplies the element (its name + DSL ASIL + type), the element box renders as the diagram root.

Idempotent: an ElementView for the same element id already present is not duplicated on re-enrichment; existing parentConstructIds are preserved (only empty ones are filled).

Generated with STIG