Skip to main content



      Home
Home » Eclipse Projects » Sirius » Precondition on table creation
Precondition on table creation [message #1706975] Tue, 01 September 2015 05:08 Go to next message
Eclipse UserFriend
Hello,

When using a table creation tool, mapping from a specific type, I would like to have a precondition enforcing that the creation option is only available if no table of that type exists already.

What expression should I use to test if the element from which I am mapping already has an associated table of that type?

Does these kind of queries over the representations themselves require that the specifier is comfortable with the sirius metamodels referred in the developer manual?

Regards
Re: Precondition on table creation [message #1707764 is a reply to message #1706975] Wed, 09 September 2015 05:03 Go to previous messageGo to next message
Eclipse UserFriend
Any help here?
Re: Precondition on table creation [message #1707782 is a reply to message #1706975] Wed, 09 September 2015 06:41 Go to previous message
Eclipse UserFriend
Hi Tiago,

Le 01/09/2015 11:08, Tiago Jorge a écrit :
> Hello,
>
> When using a table creation tool, mapping from a specific type, I would
> like to have a precondition enforcing that the creation option is only
> available if no table of that type exists already.
>
> What expression should I use to test if the element from which I am
> mapping already has an associated table of that type?

The main idea would be to retrieve the existing DTable elements and
filter them using the table description id (attribute name in the
metamodel).

Which version of Sirius and which interpreters do you currently use ?


With aql, i would try:

aql:self.eInverse(table::DTable)->select(rep:DRepresentation |
repElt.description.name = 'yourDescriptionId')->isEmpty()



> Does these kind of queries over the representations themselves require
> that the specifier is comfortable with the sirius metamodels referred in
> the developer manual?

This requires to know some parts of the Sirius metamodels:
. the DSemanticDecorator which has a target feature to reference a
semantic EObject,
. the DRepresentation which is the common abstract class between the
DSemanticDiagram, the DTable and the DTree,
. the DRepresenationElement which is the common abstract class between
the DDiagramElement (DNode, DEdge, DNodeContainer, DNodeList), the
DTableElement (DCell, DLine, DColumn) and the DTreeItem.
. DRepresentationElement.getMapping() or
DRepresentation.getDescription() will allow you to navigate to the
description model (the VSM)




>
> Regards

Regards

--
Maxime - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Label for Container necessary?
Next Topic:Is Sirius based on GMF?
Goto Forum:
  


Current Time: Wed Jul 23 12:27:17 EDT 2025

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

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

Back to the top