Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Edge Visualization & Creation Problems
Edge Visualization & Creation Problems [message #1700836] Tue, 07 July 2015 13:53 Go to next message
Victor Charpenay is currently offline Victor CharpenayFriend
Messages: 1
Registered: July 2015
Junior Member
Hi,

Sirius is an impressive tool. However, I'm running a bit into trouble to get my model being visualized, especially edges.

My model contains components, having inputs and outputs, and instances of these components. Component instances can be wired together by linking their outputs with compatible inputs of other instances.
An .ecore model and its associated Sirius specification are attached (wiremodel.*) and I use a simple example model with 2 component instances having each one input and one output and connected with each other by one wire.

I have 2 problems (somehow related):

1. Edge Visualization
First, when I define a mapping for wires (Element Based Edge), I end up with the following, while I expect only one edge to show up (node1.out -> node2.in):

index.php/fa/22415/0/

The mapping is defined as follows:
Domain Class: Wire
Source Finder Expression: [source.port/]
Target Finder Expression: [target.port/]


I tried to add a precondition expression but I can't find the right way to formulate it with Acceleo (it may look like: [self.source.instance.=(sourceView.eContainer().target)/], but this one seems wrong). I also tried to constrain the Edge Mapping so that every Edge View has to map to a Wire (for now, none is mapped to the model), but I didn't find any option to do it.

2. Edge Creation
I also defined an Edge Creation Tool (New Wire). The user should choose an Output as a source and an Input as a target. By default, the container is an Output. However, I'd like to attach the created element (i.e. the new Wire) to the root Application, not to the Output. A context change may help -as explained in other threads in this forum-, but I didn't find a way to access the Application from the Output. Is there a variable available to reference the root model element?

This wiring model is not tremendously complicated but, still, mapping it to a Sirius specification seems not trivial. I'm wondering if I missed important features of Sirius or if the model just does not fit...

Thanks a lot.
Re: Edge Visualization & Creation Problems [message #1701242 is a reply to message #1700836] Fri, 10 July 2015 08:12 Go to previous message
Laurent Redor is currently offline Laurent RedorFriend
Messages: 300
Registered: July 2009
Senior Member
Le 07/07/2015 16:03, Victor Charpenay a écrit :
> Hi,
>
Hi,

> Sirius is an impressive tool.

Thanks.

However, I'm running a bit into trouble to get my model being
visualized, especially edges.
>
> My model contains components, having inputs and outputs, and instances of these components. Component instances can be wired together by linking their outputs with compatible inputs of other instances.
> An .ecore model and its associated Sirius specification are attached (wiremodel.*) and I use a simple example model with 2 component instances having each one input and one output and connected with each other by one wire.
>
> I have 2 problems (somehow related):
>
> 1. Edge Visualization
> First, when I define a mapping for wires (Element Based Edge), I end up with the following, while I expect only one edge to show up (node1.out -> node2.in):
>
>
>
> The mapping is defined as follows:
> Domain Class: Wire
> Source Finder Expression: [source.port/]
> Target Finder Expression: [target.port/]
>
> I tried to add a precondition expression but I can't find the right way to formulate it with Acceleo (it may look like: [self.source.instance.=(sourceView.eContainer().target)/], but this one seems wrong). I also tried to constrain the Edge Mapping so that every Edge View has to map to a Wire (for now, none is mapped to the model), but I didn't find any option to do it.
>
> 2. Edge Creation
> I also defined an Edge Creation Tool (New Wire). The user should choose an Output as a source and an Input as a target. By default, the container is an Output. However, I'd like to attach the created element (i.e. the new Wire) to the root Application, not to the Output. A context change may help -as explained in other threads in this forum-, but I didn't find a way to access the Application from the Output. Is there a variable available to reference the root model element?
>
> This wiring model is not tremendously complicated but, still, mapping it to a Sirius specification seems not trivial. I'm wondering if I missed important features of Sirius or if the model just does not fit...
>
> Thanks a lot.
>

I did not succeed to create an example model with your metamodel
wiremodel.ecore.
Your need is simple so there should not be any problem to do so.
Could you please send us a complete environment (full metamodel project
and a project with your sample model file, the aird representations file
and the odesign file?
It will be easier and faster for us to help.

Regards,

--
Laurent Redor - Obeo

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


Laurent Redor - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Attach EObject to Sirius Session
Next Topic:Difficulty with handling node creation / deletion in corner cases
Goto Forum:
  


Current Time: Thu Apr 25 22:03:52 GMT 2024

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

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

Back to the top