Skip to main content
Jump to: navigation, search

GMF: Synchronized Container Use Cases

Revision as of 13:18, 12 April 2007 by (Talk | contribs) (Definitions)


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 element – diagram node or diagram itself always representing actual domain (semantic) model contents. i.e. all the child diagram nodes recognized from the underlying domain model.

canonical container – synchronized element.

non-synchronized element – diagram node or diagram itself representing only selected child diagram nodes recognized from the domain model.

synchronized diagram – diagram itself, all the diagram nodes and sub-nodes are synchronized elements

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.

Synchronized containers

Synchronized links

Non-Synchronized elements

Useing code generator to generate element synchronization

GenDiagram.synchronized property

Switching On/Off Synchronization


Back to the top