Context
Top-level work-product container for the context viewpoint — the symmetric counterpart of Requirements, Tests, Design and Analysis for the other four viewpoints.
A Context wraps one (or more) Elements plus their surrounding context-viewpoint declarations (InterfacePoints, DataTypes, Connectors, …) so the work product can carry document metadata: ISO 26262 work-product identifier, workflow + release status, version, version history, retention / security class.
Usage is optional: users who don't need document metadata can keep their context viewpoint flat (a top-level val myActivity = FusionActivity()). Adding a Context is the way to lift the same lifecycle treatment that Requirements / Tests already provide. Module checks discover every declaration in the checked module and its directly referenced model modules, with or without this container. Nested elements remain part of their module even when their own viewpoints have not been authored yet.
Example:
class FusionActivityContext : Context(
name = "Fusion Activity context",
document = DocumentMetadata(
iso26262Id = "4-6.5 Item Definition",
workflowStatus = WorkflowStatus.IN_REVIEW,
...
),
) {
val activity = FusionActivity()
// additional context-viewpoint declarations …
}
val fusionActivityContext = FusionActivityContext()Nested sub-specifications are allowed for sectioning. Only the top-level Context carries document; nested ones leave it null.
Constructors
Properties
Identity of the authored Kotlin declaration, independent of its receiving model instance. Inherited declarations retain this provenance while id distinguishes each owning instance.
Fully-qualified name of the declaring context. Prefers declaringClassNameOverride (set explicitly by source materializers or canonical-ID binding) over declaringClass's captured name; falls back to null if neither is available.
Document-level metadata. Set on the top-level specification only.
Fully-qualified unique identifier of this model instance. A member follows its actual owning instance, so two instances of the same user class have distinct member IDs. declarationId retains the common source declaration for navigation and naming rules.
Kotlin val name that holds this entity, scoped to its declaring context. Populated reflectively by WireModel.wireAll in the compiled path, or set directly via bindToSource in the source-materialized path. null until either runs.
Functions
Binds an authored field or constructor-owned value without replacing its source declaration provenance.
Registers a child entity declared inside a source-materialized parent.
Records source-declared uses without changing the target's declaration or owner.
Binds an entity to an already computed canonical MetamodelEntity.id.
Sets the canonical identifiers for an entity that was materialized from source (as opposed to being instantiated from compiled bytecode). Intended for use by PSI / source materializers such as the IDEA plugin.
Interface-point analyses in declaration order, including analyses nested beneath ports or service groups.
Structural children, including explicit metamodel containment. Relation targets retain their own declaration.