Home » Eclipse Projects » Sirius » Problem creating edges between two nodes
Problem creating edges between two nodes [message #1703459] |
Fri, 31 July 2015 16:59 |
Erlend Rommetveit Messages: 10 Registered: July 2015 |
Junior Member |
|
|
Hello.
I recently started sirius trying to create a CPN editor and now I've run into an unexpected problem.
In my ecore metamodel I have a Page containing 3 elements: Place, Arc, Transition.
I want to be able to connect Places and Transitions using the entity Arc.
I have created an element based edge with source finder expression "[self/]" and target finder expression "feature:transition", and in the edge creation tool I have a change context child with browse expression: " [source.eContainer(Model)/]". I have searched through several similar problems in these forums and tried different expressions but the results are the same. When i select my edge creation and click on a place, then a transition, nothing happens. No error, and no visualisation.
What am I doing wrong here?
I've attached a picture of my meta-model.
Just in case more information is required, I've also attached my project thus far.
Regards
Erlend
-
Attachment: cpn.rar
(Size: 7.42KB, Downloaded 112 times) -
Attachment: ZNcmecD.png
(Size: 72.06KB, Downloaded 204 times)
|
|
|
Re: Problem creating edges between two nodes [message #1703874 is a reply to message #1703459] |
Wed, 05 August 2015 14:04 |
|
Le 31/07/2015 18:59, Erlend Rommetveit a écrit :
> Hello.
Hello.
> I recently started sirius trying to create a CPN editor and now I've run into an unexpected problem.
> In my ecore metamodel I have a Page containing 3 elements: Place, Arc, Transition.
> I want to be able to connect Places and Transitions using the entity Arc.
> I have created an element based edge with source finder expression "[self/]" and target finder expression "feature:transition",
It does not make sense for an element-based edge to have "self" as a
source. For an element-based edge, the edge itself represents the
semantic element (here an instance of Arc). But you can't draw an edge
from "itself" to somewhere.
Either it should be a relation-based edge (if instances of Arc are
already represented graphically by some other mapping, which would
provide a proper starting point to anchor an edge), or an element-based
edge with a different source finder expression, for example
feature:place (just by glancing at your metamodel).
Regards,
Pierre-Charles
--
Pierre-Charles David - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Pierre-Charles David - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
| | |
Re: Problem creating edges between two nodes [message #1705100 is a reply to message #1705077] |
Wed, 12 August 2015 07:12 |
|
Hi Erlend,
Le 11/08/2015 22:51, Erlend Rommetveit a écrit :
> I've still not gotten this to work, and I don't really know what to do
> as i've googled all over the place, and I can't find any relevant
> information about it that has helped the issue. This is basically a
> glorified bump.
> I want to be able to connect Places and Transitions using the entity Arc.
I would create the following VSM Structure
. DiagramDescription with Page as domainClass
. Default Layer
. NodeMapping or ContainerMapping with Place as domainClass and
feature:containsPlaces as semanticCandidatesExpression
. NodeMapping or Containerapping with Transition as domainClass and
feature:containsTransition as semanticCandidatesExpression
. Domain based EdgeMapping with Arc as domainClass,
feature:containsArcs as semanticCandidatesExpression, feature:transition
as targetFindExpression (transition mapping as target mapping) and
feature:place as sourceFinderExpression (place mapping as source mapping)
Then do not forget to add the styles.
If you defined your diagram description
on ColouredPetriNet and want to try the preceding structure, do not
forget to change the semantic candidates expression as tehy will be
evaluated from you ColouredPetriNet element.
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
|
|
|
Re: Problem creating edges between two nodes [message #1705552 is a reply to message #1705100] |
Mon, 17 August 2015 13:12 |
Erlend Rommetveit Messages: 10 Registered: July 2015 |
Junior Member |
|
|
Hi again.
I would rather have several pages within one diagram but for now I'd just like this to work so I've now tested out exactly this setup with my project and i even created a new project with just these 4 classes that i need to test, and it still does not work. I've attached a picture of the metamodel of this new test project
Here is an overview of the VSM and the Arc mapping:
Maxime Porhel wrote on Wed, 12 August 2015 07:12Hi Erlend,
I would create the following VSM Structure
. DiagramDescription with Page as domainClass
. Default Layer
. NodeMapping or ContainerMapping with Place as domainClass and
feature:containsPlaces as semanticCandidatesExpression
. NodeMapping or Containerapping with Transition as domainClass and
feature:containsTransition as semanticCandidatesExpression
. Domain based EdgeMapping with Arc as domainClass,
feature:containsArcs as semanticCandidatesExpression, feature:transition
as targetFindExpression (transition mapping as target mapping) and
feature:place as sourceFinderExpression (place mapping as source mapping)
All styles are in place as far as I can see.
The most optimal thing would be to keep ColouredPetriNets as diagram element so that I can have several pages in one diagram as the current editor solution can have. But since I cannot put the arc entity inside the container node "Page", the feature "containsArcs" isn't available it seems. So I don't know what I would put in the Arc entity's semantic candidate expression
Maxime Porhel wrote on Wed, 12 August 2015 07:12
Then do not forget to add the styles.
If you defined your diagram description
on ColouredPetriNet and want to try the preceding structure, do not
forget to change the semantic candidates expression as tehy will be
evaluated from you ColouredPetriNet element.
EDIT: Perhaps someone could upload a simple project with a working Element Edge creation tool? And then I could check if it works here? Just a thought
-
Attachment: 4KodwEL.png
(Size: 16.71KB, Downloaded 807 times) -
Attachment: overview.png
(Size: 29.90KB, Downloaded 812 times)
[Updated on: Mon, 17 August 2015 13:43] Report message to a moderator
|
|
|
Re: Problem creating edges between two nodes [message #1705571 is a reply to message #1705552] |
Mon, 17 August 2015 14:56 |
|
Hi, Erlend
Le 17/08/2015 15:12, Erlend Rommetveit a écrit :
> Hi again.
> I would rather have several pages within one diagram but for now I'd just like this to work so I've now tested out exactly this setup with my project and i even created a new project with just these 4 classes that i need to test, and it still does not work. I've attached a picture of the metamodel of this new test project
>
>
>
> Here is an overview of the VSM and the Arc mapping:
From your VSM screenshot, it seems you try to create an Arc and to
store it in the clicked place: your changeContext var:source contains
the create instance ooperation.
From you metamodel, I would create the following operation sets:
Begin
. ChangeContext [source.eContainer()/]
. CreateInstance TypeName:ArcTest.Arc referenceName:containsArcs
variableName:myArc
. Set featureName:transition value: var:target
. Set featureName:place value: var:source
You will need additional steps (ChangeContext and Set) if Arc.transition
and Transition.arc are not eOpposite.
Same remark for Place.arc and Arc.place.
If your EPackage is not named ArcTest, replace ArcTest by its name.
Regards
>
>
> Maxime Porhel wrote on Wed, 12 August 2015 07:12
>> Hi Erlend,
>>
>> I would create the following VSM Structure
>> . DiagramDescription with Page as domainClass
>> . Default Layer
>> . NodeMapping or ContainerMapping with Place as domainClass and
>> feature:containsPlaces as semanticCandidatesExpression
>> . NodeMapping or Containerapping with Transition as domainClass and
>> feature:containsTransition as semanticCandidatesExpression
>> . Domain based EdgeMapping with Arc as domainClass,
>> feature:containsArcs as semanticCandidatesExpression, feature:transition
>> as targetFindExpression (transition mapping as target mapping) and
>> feature:place as sourceFinderExpression (place mapping as source mapping)
>
>
> All styles are in place as far as I can see.
> The most optimal thing would be to keep ColouredPetriNets as diagram element so that I can have several pages in one diagram as the current editor solution can have. But since I cannot put the arc entity inside the container node "Page", the feature "containsArcs" isn't available it seems. So I don't know what I would put in the Arc entity's semantic candidate expression
>
> Maxime Porhel wrote on Wed, 12 August 2015 07:12
>> Then do not forget to add the styles.
>> If you defined your diagram description
>> on ColouredPetriNet and want to try the preceding structure, do not
>> forget to change the semantic candidates expression as tehy will be
>> evaluated from you ColouredPetriNet element.
>
--
Maxime - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Maxime Porhel - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Goto Forum:
Current Time: Sat Apr 27 00:03:16 GMT 2024
Powered by FUDForum. Page generated in 0.06185 seconds
|