Problem with target mapping in a simple diagram extension [message #1739537] |
Tue, 02 August 2016 14:01  |
Eclipse User |
|
|
|
Hi,
I played around with diagram extensions, and my goal was to introduce additional edges that can be drawn between classes in a UML class diagram. So I created the following meta model:

The EClass ClassConnector is the domain class of my element-based edge for connecting two UML classes. I used the generator model to generate the management code for this meta model.
For the diagram extension, I did the following:
- I created a viewpoint (Model File Extension: "xmi")
- In the viewpoint, I created a diagram extension (Viewpoint URI: "viewpoint:/org.obeonetwork.dsl.uml2.design/Design", Representation Name: "Class Diagram")
- In the diagram extension, I created a new layer
- In the layer, I created an element-based edge with some style and the following properties:

- In the layer, I created a tool section
- In the tool section, I created an edge creation tool pointing to the mentioned edge element
The problem that I have is that the edge creation tool works fine for the source class ...

... but it prevents me from setting the target class:

Where is the error in this example? If I add a connection directly to the model instance (XMI file) in the reflective editor, I get the expected result (that is, an edge is drawn between the classes).
Regards,
Michael
|
|
|
|
Re: Problem with target mapping in a simple diagram extension [message #1739614 is a reply to message #1739602] |
Wed, 03 August 2016 05:33  |
Eclipse User |
|
|
|
Hi Laurent,
you were absolutely right, I had to add some operation under the Begin node (a simple Change Context was enough for testing purposes to get the mouse indicator right). I thought that an empty Begin node would simply do nothing at confirmation, but obviously it also effects the selection of the target node.
For the sake of completeness, the "Connection Complete Precondition" was empty.
Thank you very much!
Regards,
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.03793 seconds