Skip to main content



      Home
Home » Eclipse Projects » Sirius » Get eobject from link
Get eobject from link [message #1796356] Thu, 11 October 2018 10:25 Go to next message
Eclipse UserFriend
Hi,

I created an element based edge. I want to change his color if some conditions are met.

So I created a Conditionnal Style however when I use '' view.sourceNode" and "view.targetNode" I can't figure out a way to get an EObject.

I need to get the eobject the nodes are pointing to in order to check his attribute in my condition

Does any one have a clue ?
Re: Get eobject from link [message #1796413 is a reply to message #1796356] Fri, 12 October 2018 10:05 Go to previous message
Eclipse UserFriend
Hi David,

In an AQL expression, view.sourceNode and view.TargetNode will be the source diagram element and the target diagram element of your current edge.
They are elements of the internal Sirius model. They are also instance of DSemanticDecorator and have a reference "target" which is the link to the semantic model.

Semantic element of the edge:
view.oclAsType(viewpoint::DSemanticDecorator).target


Semantic element of the source:
view.sourceNode.oclAsType(viewpoint::DSemanticDecorator).target


Semantic element of the target:
view.targetNode.oclAsType(viewpoint::DSemanticDecorator).target


Regards,

[Updated on: Fri, 12 October 2018 11:02] by Moderator

Previous Topic:Table Navigation
Next Topic:Sirius at EclipseCon EU 2018
Goto Forum:
  


Current Time: Wed Jul 23 00:27:26 EDT 2025

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

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

Back to the top