The RichReferenceFigure is used to render an EObject the same way as a reference (in other words with an ReferenceFigure).
It is helpful when your model contains Association classes. In other words, it is helpful when you want to represent a relation between two EObjects that goes through an intermediate EObject without representing that intermediate EObject as a complete node.
A RichReferenceFigure also allows to attach up to three labels on the edge (at the start, in the middle and at the end). The labels are configured through an OCL expression (in order to be flexible enough to meet your own needs).
For example, with the school sample, it is possible to represent the Students directly in the Classroom nodes (see the right diagram) instead of representing them fully as nodes (as on the left diagram) :
![]() |
![]() |
![]() |
The RichReferenceFigures accepts up to 3 labels which can be put :
The source and target label positions can be adjusted thanks to the Label Angle and the Distance from source/target label to the edge-node connection properties.
Here is an illustration showing how to use the Label Angle property ;
Here are three samples with three values (0, 4, 8) for the Label Distance property :
The RichReferenceFigure accepts the following properties :
Category | Name | Description | Default literal |
---|---|---|---|
Appearance | color | The edge color | #000000 |
customSourceArrow | The custom source arrow (graphviz compliant arrow style, ignored if sourceArrowType is not set to 'custom') | ||
customTargetArrow | The custom target arrow (graphviz compliant arrow style, ignored if targetArrowType is not set to 'custom') | ||
labelAngle | This, along with labeldistance, determine where the headlabel (taillabel) are placed with respect to the head (tail) in polar coordinates. The origin in the coordinate system is the point where the edge touches the node. The ray of 0 degrees goes from the origin back along the edge, parallel to the edge at the origin. (same as Graphviz labelangle property) | 0 | |
labelDistance | Multiplicative scaling factor adjusting the distance that the headlabel(taillabel) is from the head(tail) node (same as Graphviz labeldistance property) | 5.0 | |
minimumEdgeLength | Minimum edge length (same as Graphviz minlen property) | 1 | |
sourceArrowType | The source arrow type | none | |
sourceLabelExpression | The OCL expression to use to build the source label of the edge | ||
sourceLabelStyle | The style of the source label | ||
standardLabelExpression | The OCL expression to use to build the standard (centered) label of the edge | ||
standardLabelStyle | The style of the standard (centered) label | ||
style | The edge style | normal | |
targetArrowType | The target arrow type | normal | |
targetLabelExpression | The OCL expression to use to build the target label of the edge | ||
targetLabelStyle | The style of the target label | ||
Model | eReference | The EReference that this figure will represent on the graph | |
targetEReference | The target EReference of the rich reference EClass |