Hi Suraj,
So let me check if I have your request correct.
You have an image shape as a parent and you'd like to visualize some other shape as an embedded child of that image shape?
I'll continue on the premise that I've understood you correctly. In our V1, we don't support visually embedding child shapes inside anything except the main diagram or a swimlane or using compartment line items.
Gerben is certainly right that you could decide to just switch your embedding to a reference relationship. However, in our new June CTP we're a little more flexible as you can map connectors to embedding relationships if you need to.
You should be able to achieve an effect like this.
If you set up a Connector to map to the embedding relationship between the parenting class and the thing you want to embed in it (no need for a matching Tool for the Connector) then drop the sub-shape onto the parent shape from teh toolbox, the ElementMergeDirective will connect the ModelElement mapped to the subshape as a child of the ModelElement mapped to the parent shape. A connector will then spring into life to represent the embedding relationship instance and link the two together. The one extra detail you need to set in your model is to set the element parent path in the ShapeMap for your child shape, so its shape ends up parented on the diagram rather than on the class you dropped it on.
If you start with the Minimal Sample in the June CTP and add a ChildElement DomainClass as an Embedding of ExampleElement then the path will look something like:
ExampleElementHasChildElement.ExampleElement/!ExampleElement/ModelHasElements.ExampleModel/!ExampleModel
Hope this moves you forward.
Gareth Jones - Developer - DSL Tools & Software Factories Platform [MSFT] |