Skip to content

[Add] A3 - Honor ExtendedMetaData XML names so GMF notation geometry reads #65

Description

@samatstariongroup

Part of #50 (Phase A — Foundation). deps: #51 (A1), #52 (A2, done in #64, restructured in #67).
Blocks #55 (C1).

Discovered while landing the first .aird read path in #64: the GMF notation geometry tree
(notation:Node / notation:Edge / Bounds x/y/w/h, bendpoints) is not read, so an .aird
currently yields the Sirius representation elements (DNode/DEdge/styles) but none of their persisted
coordinates. The intermediate diagram model (#55) consumes exactly that persisted layout, so this
blocks the whole rendering phase.

Root cause

GMF renames its XML elements via ExtendedMetaData annotations
(source=http://www.eclipse.org/emf/2002/Ecore, detail name) — e.g. the containment feature
View.persistedChildren serializes as <children>, persistedEdges as <edges>. The generated
readers switch on the raw Ecore feature name (persistedChildren), but the .aird contains
<children>, so those elements fall through to the lenient default case and the whole subtree is
skipped.

Two problems compound:

  1. The vendored resources/ecore-sirius/notation.ecore has zero ExtendedMetaData annotations
    (they were stripped/absent when it was vendored in [Add] A1 — Vendor the Sirius + GMF Ecore metamodels #51), so the information is not even present.
  2. Auriga.CodeGenerator does not honor ExtendedMetaData name / kind when it emits reader
    case labels, writer element names, and attribute names — it uses the Ecore feature name.

Scope

  • Re-vendor notation.ecore (and any other Sirius ecore that relies on it) with their
    ExtendedMetaData annotations intact
    — from the upstream eclipse-gmf-runtime / eclipse-sirius
    sources — mirroring how [Add] A1 — Vendor the Sirius + GMF Ecore metamodels #51 documents provenance + EPL-2.0. Update the metamodel-inventory doc.
  • Teach the generator to honor ExtendedMetaData: when a feature carries an
    http://www.eclipse.org/emf/2002/Ecore annotation with a name detail, use that as the XML
    element/attribute name in the generated readers (case labels) and writers; respect kind
    (element vs attribute) where set. Fall back to the feature name when absent — so Capella output
    stays behavior-identical (Capella ecores use no ExtendedMetaData).
  • Regenerate both metamodels via the Regenerate_* explicit tests (since [Update] Merge object models into Auriga + Auriga.Xmi with Model/Diagram namespace separation; unify the XMI builders #67 the Sirius output
    lands in the Diagram/ sub-trees of Auriga / Auriga.Xmi, namespaces Auriga.Diagram.* /
    Auriga.Xmi.Diagram.*); the Capella golden/drift guards and the Sirius drift guard
    (SiriusGeneratorTestFixture) must stay green.

Acceptance

  • Reading coffee-machine-demo.aird yields the GMF notation tree: notation:Diagram
    notation:Node / notation:Edge with Bounds (x/y/w/h) populated.
  • The .aird reader test (Auriga.Xmi.Tests/Diagram/AirdReaderTestFixture.cs) asserts a
    non-trivial count of notation elements with geometry (currently 12; should be ~1600 for
    coffee-machine).
  • Capella generation stays behavior-identical (golden/drift green).

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions