Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 486165

Summary: Replace use of diagram.EdgeTarget with more interesting "types" during validation
Product: [Modeling] Sirius Reporter: Cedric Brun <cedric.brun>
Component: CoreAssignee: Project inbox <sirius.core-inbox>
Status: CLOSED FIXED QA Contact: Laurent Fasani <laurent.fasani>
Severity: normal    
Priority: P3 CC: florian.barbin, laurent.fasani, pierre-charles.david
Version: 3.1.0Keywords: triaged
Target Milestone: 5.0.0   
Hardware: PC   
OS: All   
See Also: https://git.eclipse.org/r/64852
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=48270ead5dfd583d865c994827d858695a7acaf3
Whiteboard:

Description Cedric Brun CLA 2016-01-20 06:10:36 EST
During the validation of EdgeCreationDescription and ReconnectEdgeDescription tools the type analysis might define the type of the "otherEnd", "preSourceView" and "preTargetView" as "EdgeTarget".

This type has very litle information which could be considered useful in the context of VSM queries (it only has outgoing and incoming edges references).
More useful features : the "target" reference for instance, which will *always be there* considering the known subtypes of EdgeTarget.

This ticket is about declaring a union type of all the known subtypes of EdgeTarget instead of using EdgeTarget directly.
Comment 1 Eclipse Genie CLA 2016-01-21 05:12:38 EST
New Gerrit change created: https://git.eclipse.org/r/64852
Comment 3 Pierre-Charles David CLA 2017-01-10 04:50:49 EST
Fixed by 48270ead5dfd583d865c994827d858695a7acaf3 (which includes an updated test case which takes the new types into account).
Comment 4 Laurent Fasani CLA 2017-05-22 10:23:32 EDT
A validation scenario would be welcome.
Even looking at the gerrit I am not sure of what to test
Comment 5 Cedric Brun CLA 2017-05-22 10:29:57 EDT
Define EdgeCreationDescription and ReconnectEdgeDescription in a .odesign, 
assign those to an EdgeMapping which has proper source/target node mappings

In the tool description check that the variables "otherEnd", "preSourceView" and "preTargetView" don't have the "EdgeTarget" type but the "DNode" or "DNodeList" or "DNodeContainer" type depending on your VSM.

You can check the type by typing var:otherE and triggering the completion with CTRL+SPACE.
Comment 6 Laurent Fasani CLA 2017-05-22 10:51:32 EDT
Validated with "sourceView", "targetView", "preSourceView" and "preTargetView"  variables on EdgeCreationDescription and ReconnectEdgeDescription tools.

("preSourceView" and "preTargetView" are available only in EdgeCreationDescription precondition)

Validated on ODCE_20170521
Comment 7 Pierre-Charles David CLA 2017-06-29 03:33:09 EDT
Available in Sirius 5.0.0, see https://wiki.eclipse.org/Sirius/5.0.0 for details.