Hello,
I am trying to use the "Diagram extension" feature in a "odesign" file.
In a first odesign, I have defined a representation for a particular type of object :
- New "Viewpoint" with ID : "ViewpointFirst"
- New "Diagram Representation" with ID : "MyDiagram"
- New "Default layer"
- New "Node" with ID : "elementnode1" and Domain class : "mypackage.MyFirstClass"
I also added a "dot gray" style to this node.
My use case is that I load my odesign file directly in an eclipse RCP application.
It works correctly (objects of class "MyFirstClass" are shown) when I load it with the registry :
ViewpointRegistry.getInstance().registerFromPlugin("my-module/description/First.odesign");
and then, getting the viewpoint like this :
ViewpointRegistry.getInstance().getViewpoint(URI.createURI("viewpoint:/my-module/ViewpointFirst"));
Now, I created a second odesign which should extend the first one. To do that, I have added a "Diagram extension" element in a new viewpoint called "ViewpointSecond", which have these properties :
Name : "extension1"
Viewpoint URI : "viewpoint:/my-module/ViewpointFirst"
Representation Name : "MyDiagram"
In this diagram extension I added a representation for objects of type "mypackage.MySecondClass".
Also, I have added a new representation for another type : "mypackage.MyThirdClass"
Now, I load the two odesign using the same method explained for the first odesign:
ViewpointRegistry.getInstance().registerFromPlugin("my-module/description/First.odesign");
ViewpointRegistry.getInstance().registerFromPlugin("my-module/description/Second.odesign");
and I get the viewpoint of the second one :
ViewpointRegistry.getInstance().getViewpoint(URI.createURI("viewpoint:/my-module/ViewpointSecond"));
It is not working at all (objets are not shown) except for the representation of the "mypackage.MyThirdClass". I expected to have a representation for all the 3 types of objects.
I am using Sirius version 4.0.0.
What am I doing wrong here ?
Thank you.