|
|
Re: Delete Edge [message #1654197 is a reply to message #1630830] |
Fri, 06 March 2015 15:28 |
|
Hi Adrien,
If your two EReference are not bi-directionnal (eOpposite), you have to
put the second unset operation in a ChangeContext able to navigate to
the second element (on which you want to unset the satifies attribute).
The order of your operations might depend on your edge mapping
definition (who is the source, who is the target). Note that for a
Relation Base Edge mapping, the source semantic element will be the
semantic element of the source of the edge.
Le 23/02/2015 13:22, Adrien Lefevre a écrit :
> Good morning,
>
> I'm trying to delete an edge between two nodes (Relation Based Edge).
> My first element called A is linked to my second one called B. I changed
> their attributes: B is "satisfiedBy" A and A "satisfies" B.
>
>
>
>
>
>
>
> Thanks to an unset, I can delete the value of my target's attribute
> "satisfiedBy" but I don't know how to delete the source's attribute
> "satisfies". I tried the following code but it didn't work for "satisfies".
>
>
>
>
>
>
>
> By the way, do you know if I can fin a book explaining how to use Sirius?
There's no plan for this right now, but Obeo provides training if you're
interested (including in English): see
http://www.obeo.fr/en/services/training for details.
You can also find the documentation online
(https://www.eclipse.org/sirius/doc/) or in your Eclipse help (Help >
Help Contents > Sirius)
>
> Thank you,
>
> Adrien.
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: Delete Edge [message #1690503 is a reply to message #1661208] |
Fri, 27 March 2015 16:17 |
|
Hi Adrien
Le 09/03/2015 15:28, Adrien Lefevre a écrit :
> Good morning,
> This is the definition of my link:
>
>
>
> As you can notice, the Target Finder Expression is a feature,
> satisfiedBy. Does it mean when I delete the link, I can only have a role
> on this feature?
This means that your delete tool has to unset the feature on the source
element. And if the satifies reference is not an eopposite of
satifiedBy, you will have to unset this one too.
You have a RelationBased edge mapping, so the semantic element of your
DEdge will be the source semantic element: for edges described by
RelationBase edge mappings: [element/] isEquivalent to
elementView.oclAsType(DEdge).sourceNode.oclAsType(DNode).target/]
>
> I also tried with two ChangeContext like that:
>
>
IMO, if you the two features are not eOpposite and are multi-valued:
. your first change context should be [element/]
. your first Unset element expression should be
[elementView.osclAsType(DEdge).targetNode.oclAsType(DNode).target/]
. your second change context should be something like
[elementView.osclAsType(DEdge).targetNode.oclAsType(DNode).target/]
. your second Unset element expression should be
[element/]
If the features you want to unset are not multi-valued, you can let the
element expression empty, Sirius will just unset the feature.
You might also look at the ecore tool VSM [1] to see how the delete tool
for the ESuperTypes edges for has been implemented.
>
> But nothing happened, still the same problem.
> thank you,
>
> Adrien.
Regards
--
Maxime - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1] EcoreTools 2 VSM:
http://git.eclipse.org/c/ecoretools/org.eclipse.ecoretools.git/tree/org.eclipse.emf.ecoretools.design/description/ecore.odesign?h=2.0
Maxime Porhel - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.05271 seconds