Skip to main content



      Home
Home » Eclipse Projects » Sirius » Element Based Edge in one editor across different metamodels
Element Based Edge in one editor across different metamodels [message #1840510] Fri, 16 April 2021 16:49 Go to next message
Eclipse UserFriend
Hi,

I have 2 metamodels that are dependent upon one another, show in the picture below:
index.php/fa/40349/0/

I am trying to define the Input and Output classes that inherit from Global_Reference in my Sirius editor however for whatever reason when I define them the graphics for those classes do not appear in my editor. Is there a reason for this? As far as I can tell I have the fields filled out properly. Is this a bug?

My goal is to be able to have the source of an Input class be a Global_Data class while the target is a Public_Process class.

[Updated on: Tue, 20 April 2021 14:14] by Moderator

Re: Element Based Edge in one editor across different metamodels [message #1840643 is a reply to message #1840510] Wed, 21 April 2021 05:29 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

The Ecore Tools modeler used here uses _unsynchronized_ elements, meaning a concrete diagram will not automatically display all the elements that exist in your model.

When you create a new element (e.g. an EClass) directly from the diagram a graphical view for it will automatically be created, but if an EClass is created from another diagram or via a non-graphical operation, Sirius will not automatically create one.
This is a specific choice of Ecore Tools, other Sirius modelers choose to have all (or some of) their elements synchronized.

To manually create a graphical representation of an existing element on your diagram, you can either drag and drop it from the model explorer to the diagram, or use the "Add" tool in the "Existing Elements" category in the palette.
It will open a dialog where you can choose which additional elements (e.g. the Input and Output classes) should be represented on the diagram.
Re: Element Based Edge in one editor across different metamodels [message #1840662 is a reply to message #1840643] Wed, 21 April 2021 10:39 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I have used the add elements tool in order to create the inter-dependent metamodels. The issue comes when I try to make an instance of them in Sirius. I have set all my concrete syntax definitions now to be synchronized but it still doesn't seem to create a graphical representation of my Input and Output classes in my editor. I suspected it was because the 'src' feature of the Input class is from one metamodel while the 'tgt' feature is from another, but then creating graphical representations for all of the non-reference classes works just fine so I was wondering if there was something else that I am missing now as well as the synchronized issue that you brought up.
index.php/fa/40377/0/

If it helps the image above is how I currently have the element based edge for the Input class defined.

[Updated on: Wed, 21 April 2021 12:32] by Moderator

Re: Element Based Edge in one editor across different metamodels [message #1840704 is a reply to message #1840662] Thu, 22 April 2021 04:56 Go to previous message
Eclipse UserFriend
Hi,

From the screeshot, your Input edge mapping uses source and target mappings like Public Progress and Data Element which are from another diagram definition. This is not supported, a diagram instance will only display instances of mappings from its own definition.

The Sirius Specification Editor unfortunately allows to chose all elements from anywhere in the file when choosing a source/target mapping, but ideally it should restrict the choices to the current diagram definition.

You can either create copies of the Public Progress mapping (and others) inside the WFP diagram (but it's more work to maintain), or define in WFP mapping imports which point to the original definitions from the other diagram definition.
Previous Topic:creation tools are not working
Next Topic:New Element Based Edge not working
Goto Forum:
  


Current Time: Wed Jul 23 05:44:13 EDT 2025

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

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

Back to the top