Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Diagram extension not working
Diagram extension not working [message #1748548] Thu, 24 November 2016 10:04
Henry Marchand is currently offline Henry MarchandFriend
Messages: 3
Registered: November 2016
Junior Member
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.
Previous Topic:Open custom editor when double click on the Problems View
Next Topic:Trying to create View for my own model
Goto Forum:
  


Current Time: Sat Apr 20 06:34:15 GMT 2024

Powered by FUDForum. Page generated in 0.22947 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top