Problem with target mapping in a simple diagram extension [message #1739537] |
Tue, 02 August 2016 18:01 |
Michael Szvetits Messages: 5 Registered: May 2016 |
Junior Member |
|
|
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 #1739602 is a reply to message #1739537] |
Wed, 03 August 2016 08:45 |
|
Hello
Fisrt of all, I have some remarks. You said :"I created a viewpoint (Model File Extension: "xmi")" . If you created a new VSP (viewpoint specific project) that contains a VSM or a new VSM inside your modeling project, both VSM should have an odesign extension file.(the file struture is xmi)
Now, globally, what you did seems correct.
Nevertheless, make sure that :
*on your edge creation tool, you have not an incorrect "Connection Complete Precondition"
* you added some operations under the Begin node. Typically you should have "Create Instance" and "Set"s operations to create a ClassConnector and to set source and target features
Regards
Laurent
Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.03571 seconds