import type { SModelRoot } from 'sprotty-protocol'; import { LangiumDiagramGenerator, type GeneratorContext } from 'langium-sprotty'; /** * Generates context map diagrams in the **DDD community notation** style. * * Bounded contexts are rendered as ellipses. Relationships are rendered as edges * with U/D (upstream/downstream) annotations and integration pattern labels at * each end, matching the notation used in Eric Evans' "Domain-Driven Design" and * Vaughn Vernon's "Implementing Domain-Driven Design". * * Edge label convention: * - Position 0.1 (near source): `U [OHS, PL]` or `D [ACL]` * - Position 0.9 (near target): `D [CF]` or `U [OHS]` * - Position 0.5 (center): relationship type (e.g., "Customer/Supplier") */ export declare class DomainLangContextMapDiagramGenerator extends LangiumDiagramGenerator { protected generateRoot(args: GeneratorContext): SModelRoot; /** * Creates an edge with DDD community notation labels. * * For `->`: left = Upstream (U), right = Downstream (D) * For `<-`: left = Downstream (D), right = Upstream (U) * For `<->`: Partnership (bidirectional) * For `><`: Separate Ways * * U/D labels are rendered as DDD notation badges with optional * pattern boxes (e.g., `U [OHS, PL]`). */ private createRelationshipEdge; /** * Creates an undirected edge for symmetric relationships (SK, P, SW). * * Symmetric relationships have no upstream/downstream directionality. * The center label shows the relationship kind (e.g. "Shared Kernel"). */ private createSymmetricEdge; /** * Adds a U/D badge label at the source or target end of an edge. * * Patterns are normalised to their short abbreviations (e.g. `OpenHostService` → * `OHS`) and `BBoM`/`BigBallOfMud` is excluded — BBoM is surfaced visually as a * cloud node shape rather than a text annotation. * * Badge text format: `ROLE|PATTERNS` (e.g. `U|OHS, PL` or `D|ACL`). * The webview `UDBadgeLabelView` renders this as a bordered box. */ private addUDBadge; /** * Adds a center label to an edge showing the relationship kind. * * Maps DomainLang keywords to DDD community notation display names: * SharedKernel → Shared Kernel, SeparateWays → Separate Ways, Partnership → Partnership. * Directional kinds (CustomerSupplier, UpstreamDownstream) are omitted — conveyed by U/D and C/S role badges. */ private addCenterLabel; private collectContextMapNodes; private ensureNodeForContextMapItem; private createNode; private createNodeLabel; private ensureNode; private ensureUnresolvedNode; private getNodeKey; private getSelection; private getStringOption; private selectContextMap; }