Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Graphical Description Problem
Graphical Description Problem [message #1804990] Thu, 04 April 2019 11:14 Go to next message
Marvin Roger Wagner is currently offline Marvin Roger WagnerFriend
Messages: 4
Registered: April 2019
Junior Member
Hi together,

I want to build a Sirius editor based on the following minimal example of an ECore model. In addition, I show a minimal example for the graphical description.
In the diagram ExampleViewDiagram will be an instance of ClassD, ClassC shall be represented by ClassCContainer, ClassA shall be represented by ClassANode and ClassB shall be represented by BorderedClassBNode.
There shall be serveral ClassCContainers. ClassANode shall be in the ClassCContainer if ClassA contains one or more instances of type ClassB and at least one of these instances has a relation to specific ClassC. One instance of ClassA can be in serveral ClassCContainers. And, the instances of ClassB which have a relation to ClassC shall be attached as BorderedClassBNode to ClassA. The creation of the ClassANodes works fine, but the selection of semantic candidates for the BorderedClassBNodes make problems. I was not able to reach the instance of ClassC to decide whether ClassB has a relation to it. Reaching means to go two step upwards in the description's tree structure.

Is there any way to do this?

[Updated on: Fri, 05 April 2019 10:48]

Report message to a moderator

Re: Graphical Description Problem [message #1805168 is a reply to message #1804990] Tue, 09 April 2019 07:34 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 227
Registered: August 2010
Senior Member
Hello,

From what I understand, the semantic candidates for the ClassANode will be something like "self.d.eContainer()" since ClassB elements are contained in ClassA. Only one graphical element should be displayed per ClassA in one ClassC container. For Bordered node ClassB, the semantic candidates expression will be "self.b" (we start from the ClassA element)

Regards,
Florian
Re: Graphical Description Problem [message #1805284 is a reply to message #1804990] Thu, 11 April 2019 08:16 Go to previous message
Marvin Roger Wagner is currently offline Marvin Roger WagnerFriend
Messages: 4
Registered: April 2019
Junior Member
Thanks for your reply.

I tried it with the semantic candidates expression, which you suggested. But then all instances of ClassB contained in ClassA are displayed.
I modified the old example for a better comprehension of the problem. The NetworkContainer represents the Networkzone, the ComponentNode represents the Component and the BorderedInterfaceNode represents the Interface. The System in the ECore model is my root element. A system has several network zones and several components. A component has several interfaces. An interface can be assigned to a network zone. A network zone has an arbitrary number of assigned interfaces of different components. Therefore, a component can have maybe two interfaces but the interfaces are in different network zones.
As a graphical result, I want to realize that the ComponentNode is shown in both network zones, but only the interfaces assigned to the specific zone shall be visible for the Node instance in the corresponding zone.
If I use the semantic candidates expression "aql:self.interfaces" then all interfaces of a component are shown in every network zone.
I attached a picture of the current result. The upper nodes "U-1" and "C2C-1" show only that "U-1" is assigned to "Zone 1" and "C2C-1" is assigned to "Zone 2". Both interfaces belongs to the component "net".
I hope the problem is easier to understand now.


Current semantic candidates expressions:
-NetworkContainer: feature:networkzones
-ComponentNode: aql:self.eContainer(system::System).components->select(c | c.interfaces->exists(i | i.networkzone = self))
-BorderedInterfaceNode: aql:self.interfaces
Previous Topic:Use a List of eObject in a table
Next Topic:Impossible to use External Java Action
Goto Forum:
  


Current Time: Tue Sep 17 10:15:01 GMT 2019

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

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

Back to the top