| Summary: | Variables missing in the precondition of the reconnect edge tool | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Amine Kechaou <aminekechaou> |
| Component: | Diagram | Assignee: | Jessy Mallet <jessy.mallet> |
| Status: | CLOSED FIXED | QA Contact: | Julien Dupont <julien.dupont> |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | julien.dupont, maxime.porhel, pierre-charles.david |
| Version: | 4.1.1 | Keywords: | triaged |
| Target Milestone: | 5.1.0 | ||
| Hardware: | PC | ||
| OS: | Windows 10 | ||
| See Also: |
https://git.eclipse.org/r/101504 https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=7d83ced3b2347d2e888e3a4898e15aab66cd7d3f |
||
| Whiteboard: | siriuscon2016 | ||
|
Description
Amine Kechaou
Hi Amine, Note that the variable are not displayed in the completion and will make the validation fail but they are available at runtime for the evaluation of Reconnection tool's precondition, here are the name and meaning of those variables: . source: the semantic element which is pointed before the reconnect. . target: the semantic element which is pointed after the reconnect. . sourceView : the graphical element which is pointed before the reconnect. . targetView : the graphical element which is pointed after the reconnect. . diagram : the current Diagram. It seems you already have access to edgeView and otherEnd, so its possible to use edge.sourceNode and edge.targetNode to retrieve the source and target of the edge) but also to the "other end" ie the fixed end of the edge during the reconnect (as illustrated in the Reconnect Edge section of https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html). Note that we recommend to create two reconnect tools (one with kind Source, the other with kind Target) instead of one single "kind=both" tool. This simplify the preconditions and the model operation as each tools knows its context: ie "sourceView/targetView" are the old/new source or target regarding the reconnection kind of the tool and the specifier has no need to try to identify the kind from the user interaction (if the tool is configured with kind=both). Having the currently hidden variable in the completion would be a great help. Nevertheless, it's not yet in the scope of a future release. Regards Maxime Sorry to move this, but we won't have the resources to work on this for 5.0. Marking as a backport candidate for a future 5.0.x if possible. New Gerrit change created: https://git.eclipse.org/r/101504 Step to reproduce: . create a modeling project with odesign file inside . Open the odesign file and unfold Rectilinear>MyRectilinearEdgeViewpoint>ClassDiag>Default>Section . Click on tool "Reconnect Edge" and open properties view . On Precondition field, make sure that you have access to "container"/"source"/"sourceView"/"target"/"targetView" variables with autocompletion. . Launch a validation on the tool, no errors should be detected Gerrit change https://git.eclipse.org/r/101504 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=7d83ced3b2347d2e888e3a4898e15aab66cd7d3f Fixed by 7d83ced3b2347d2e888e3a4898e15aab66cd7d3f. Available in Sirius 5.1.0, see https://wiki.eclipse.org/Sirius/5.1.0. |