GMF: Synchronized Container Use Cases
In the current state GMF supports two modes of diagram code generation - synchronized and non-synchronised. Toolsmith is able to switch between these two modes by changing GenDiagram.synchronized property. There were a number of discussions concerning diagram behavior in different situations according to the current mode. The idea of this document is to summarize existing requirements to simplify upcoming features development. Once this document will be finalized, corresponding changes should be introduced into the code generator and the runtime part if necessary.
This document will cover common use cases for different type of synchronized/non-synchronized diagrams from the end-user point of view and highlight corresponding places in code generator/runtime to be used to in corresponding conditions.
synchronized diagram element – element visualized on diagram containing all the child diagram nodes recognized from the domain (semantic) model.
canonical container – synchronized diagram element.
non-synchronized diagram element – element visualized on diagram representing only selected child diagram nodes recognized from the domain (semantic) model.
synchronized diagram – diagram always representing all the diagram nodes recognized from the domain model element associated with diagram and all the sub-nodes recognized from the domain model.
element-based link – diagram link associated with the element in a domain model connecting link source with link target domain model elements.
reference-only link – diagram link representing reference in a domain model. This reference contained in a link source domain model element and pointing to the link target domain model element.
CanonicalEditPolicy - abstract class in GMF runtime implementing EditPolicy and encapsulating set of functionality useful for synchronizing diagram element contents with the domain model element contents.
CanonicalConnectionEditPolicy – abstract subclass of CanonicalEditPolicy supporting outgoing element-based diagram links synchronization.