Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Creating a table editor in Sirius
Creating a table editor in Sirius [message #1842123] Wed, 09 June 2021 16:23 Go to next message
Thomas Chiang is currently offline Thomas ChiangFriend
Messages: 83
Registered: March 2020
Member
Hi,

I am going through the example for how to create tabular representations of my model and I am confused about how the columns are supposed to work. My test model is the following:
index.php/fa/40607/0/

What I want to do is to have the process nodes (the green boxes) appear in the columns next to the data nodes (the yellow boxes) like so:
index.php/fa/40608/0/

My confusion is about what to put in the feature name section of the properties of my columns. The data and process nodes are connected by element based edges which is different from the example so I can't just blindly copy it. Any help would be greatly appreciated.

Edit: I think I want this to be a cross table rather than an edition table because I want it to be a reflection of the class diagram representation editor that I have created and thus be able to edit the model as easily from the table as the class diagram.

Another edit: Is it possible to get access to this example from the documentation here:
https://www.eclipse.org/sirius/doc/specifier/tables/Tables.html#edition_tables

And if so can someone post it or direct me to where to download it? I've downloaded the Ober Designer Community 11.1 through marketplace but it seems that the example is not included in the installation.

[Updated on: Wed, 09 June 2021 20:39]

Report message to a moderator

Re: Creating a table editor in Sirius [message #1842163 is a reply to message #1842123] Thu, 10 June 2021 16:10 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 515
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Thomas,

Did you try to compute the label based on those two paragaphs:

Quote:

A Feature Column mapping is defined by its Feature Name, which should normally be the name of a valid feature (attribute or reference) of the element which appear in the tables' lines. If a line represents a semantic element S1 but you want on some column to show a property of an element reachable from S1 instead of S1 itself, you can use the Feature Parent Expression ( Advanced category), which is evaluated in the context of S1 and should return an element S2. S2 will be considered the target element of the cell at this intersection instead of S1.
...
The Label Expression is used to compute the text to show in each cell. It is evaluated for each cell in the context of its target semantic element. If you compute text for elements whose EClass have no common EStructuralFeatures (inherited or with same name), you can use * as Feature Name to skip the feature name validation during the cell creation.


You should be able to use aql expressions to compute the label or retrieve the feature parent expression based on your metamodel and the relation between your Element and Process concepts.

Regards


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Creating a table editor in Sirius [message #1842165 is a reply to message #1842163] Thu, 10 June 2021 16:41 Go to previous message
Thomas Chiang is currently offline Thomas ChiangFriend
Messages: 83
Registered: March 2020
Member
Hi Maxime,

I have been able to get the table to computationally generate the labels using aql but not using the feature parent expression box. The command I've been using is
aql: self.input.tgt.name

That works fine for when I only have Data as the rows, but if I want to add Atomic Process to the rows too then I need more granularity to be able to access the feature parent since the Input class is shared between data and process. I would like one column to be filled purely based on data rows and another column to be filled purely based on process rows. I'm not sure how to achieve that kind of granularity.
Previous Topic:Container Drop Relation based edges
Next Topic:Copy and paste a graphical container with a representation
Goto Forum:
  


Current Time: Wed Sep 28 17:10:36 GMT 2022

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

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

Back to the top