Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » EditionTableDescription: Accessability of semantic elements in context of FeatureParentExpression(How to access the semantic element of a top-level LineMapping in the context of the FeatureParentExpression of a FeatureColumnMapping when being evaluated for a sub-level LineMapping)
EditionTableDescription: Accessability of semantic elements in context of FeatureParentExpression [message #1694337] Mon, 04 May 2015 14:55 Go to next message
Benjamin Esterl is currently offline Benjamin EsterlFriend
Messages: 4
Registered: May 2015
Junior Member
Hi,
I am currently working on an EditionTableDescription and am facing some tricky question, when it comes to the variables that are accessible in the context of the FeatureParentExpression (see Advanced Tab) of a FeatureColumnMapping.

According to the tool tip of the FeatureParentExpression only the variables "root (semantic target of the current Table)" and "container (semantic target of the current Line)" are available.
Working with those two variables is fine for me, as long as I am only using (top-level) LineMappings, where only the semantic targets of the Line and the Table are required for my calculations.

My problem is now:
When working with (sub-level) LineMappings (integrated underneath a (top-level) LineMapping), the "container" variable is then the semantic target of this SubLine (which makes totally sense) and the "root" variable is still the semantic element of the Table.
But to be able to do my calculations (using java code) in the context of the FeatureParentExpression properly, in addition I would also need the semantic target of the (top-level) Line, that is surrounding the SubLine.

Can anyone give me a hint on how to access this semantic target?
Are there any further variables accessible in the context of a FeatureParentExpression, that might not be documented or displayed using auto-completion.
I have seen that for the "AssociatedElementsExpression" (also in the Advanced tab of a FeatureColumnMapping) also some view variables are accessible. Something like that would help me in my context, I guess.

I would really appreciate, if someone could give me some advice.

Thank you in advance,
Benjamin.


Remark: As far as I have understood the TableDescriptions in Sirius so far, I do not see any solution to my problem by leaving the FeatureParentExpression, but only working with the Line element as parent for the FeatureColumn. Also using CrossTableDescription unfortunately would not help me in my context.
Re: EditionTableDescription: Accessability of semantic elements in context of FeatureParentExpressio [message #1694414 is a reply to message #1694337] Tue, 05 May 2015 08:18 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Benjamin,

A solution could be to have access to two additional variables like table and line, then you could navigate in the table structure and then use the target reference to retrieve the corresponding domain element.

Unfortunately, you only have access to root (semantic element of the current table) and container (semantic element of the current line).

Could you open a bug on the Sirius bugzilla [1] ?

A workaround could be to use * or a feature of your current line element as feature name, but use the label expression to compute and retrieve the information you want to use. You will have access to :
. line: the current DLine
. container and lineSemantic: the semantic element of the current line

So you will be able to navigate in your lines structure from the line variable.

Regards

--
Maxime - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius

--
[1] https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Sirius

[Updated on: Tue, 05 May 2015 08:19]

Report message to a moderator

Re: EditionTableDescription: Accessability of semantic elements in context of FeatureParentExpressio [message #1694435 is a reply to message #1694414] Tue, 05 May 2015 10:03 Go to previous messageGo to next message
Benjamin Esterl is currently offline Benjamin EsterlFriend
Messages: 4
Registered: May 2015
Junior Member
Hi Maxime,

thank you for your quick reply.
I already tried using the Label Expression, as it provides more variables to access. But unfortunately that means that the information provided by the feature is not in sync with the displayed information provided by the label expression. This would not be a problem if I only wanted to display information, but I also want to be able to edit those fields.

I will provide a new bugzilla entry.
Thank you for your help.

Regards,
Benjamin.
Re: EditionTableDescription: Accessability of semantic elements in context of FeatureParentExpressio [message #1694437 is a reply to message #1694435] Tue, 05 May 2015 10:59 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Benjamin,

Le 05/05/2015 12:03, Benjamin Esterl a écrit :
> Hi Maxime,
> thank you for your quick reply.
> I already tried using the Label Expression, as it provides more
> variables to access. But unfortunately that means that the information
> provided by the feature is not in sync with the displayed information
> provided by the label expression.


This would not be a problem if I only
> wanted to display information, but I also want to be able to edit those
> fields.

The LabelEditTool should allow you to update the correct semantic
element, but there are only semantic elements available through
variable: we should also add line (and table) variable here.

>
> I will provide a new bugzilla entry.
> Thank you for your help.
>
> Regards,
> Benjamin.

Regards

--
Maxime - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Sirius from ecore model.
Next Topic:Validate diagram throws exception
Goto Forum:
  


Current Time: Fri Apr 26 10:03:38 GMT 2024

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

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

Back to the top