Skip to main content



      Home
Home » Eclipse Projects » Sirius » Sirius Palette: problems in edge creation
Sirius Palette: problems in edge creation [message #1733519] Sun, 29 May 2016 11:04 Go to next message
Eclipse UserFriend
Hello everyone.
Hope someone can help me with this problem.
You can find attached an image of my model.
The abstract Class Edges is contained in another abstract superclass called Elements and is the super type of the class "edge".
Class edge has two references with another class called "node" which are target a source.
When trying to create a palette tool in sirius it works for the node creation.
When trying to create a tool to design an edge (Edge creation), i'm not able to design it because Sirius offers me only 4 variables:
-source view
-target view
-target
-source
I've not the var:container available and i don't know how to create an istance of the edge.
The correct order of operation should be:
1)Create an istance of the edge and setting its name.
2)Setting the source property of the new instance equals to the name of the node I clicked onto (the source node and so the first node clicked onto)
3)Setting the target property of the new instance equals to the name of the node I connected with (the target node and so the node where the mouse is released on)
4)change context to the source node for setting its output property equal to the name of the new instance
5)change context to the target node for setting its input property equal to the name of the new instance

What are the right operations to achieve this results?
Thanks in advance.
Re: Sirius Palette: problems in edge creation [message #1733722 is a reply to message #1733519] Tue, 31 May 2016 04:38 Go to previous message
Eclipse UserFriend
Le 30/05/2016 à 22:52, Savino Dambra a écrit :
> Hello everyone.

Hi,

> Hope someone can help me with this problem.
> You can find attached an image of my model.
> The abstract Class Edges is contained in another abstract superclass called Elements and is the super type of the class "edge".
> Class edge has two references with another class called "node" which are target a source.
> When trying to create a palette tool in sirius it works for the node creation.
> When trying to create a tool to design an edge (Edge creation), i'm not able to design it because Sirius offers me only 4 variables:
> -source view
> -target view
> -target
> -source
> I've not the var:container available and i don't know how to create an istance of the edge.

You can probably retrieve the "container" through the source or target
variable? ("aql:source.eContainer()" or something like this).

> The correct order of operation should be:
> 1)Create an istance of the edge and setting its name.
Yes with a CreateInstance operation and then a Set operation with the
feature name "name".
> 2)Setting the source property of the new instance equals to the name of the node I clicked onto (the source node and so the first node clicked onto)
Not exactly. I think you must use a Set operation with the feature name
"source" and with value expression "var:source".
> 3)Setting the target property of the new instance equals to the name of the node I connected with (the target node and so the node where the mouse is released on)
Not exactly. I think you must use a Set operation with the feature name
"target" and with value expression "var:target".
> 4)change context to the source node for setting its output property equal to the name of the new instance
> 5)change context to the target node for setting its input property equal to the name of the new instance
The steps 4 and 5 are not needed (or for something specific to your
metamodel that is not described here).
>
> What are the right operations to achieve this results?
> Thanks in advance.
>

Regards,

--
Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:inactive representations: how to deal with ?!
Next Topic:Delete relation in model if source/target node is deleted
Goto Forum:
  


Current Time: Wed Mar 26 21:36:52 EDT 2025

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

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

Back to the top