Bug 483006 - Bad context completion in field precondition of container creation tool
Summary: Bad context completion in field precondition of container creation tool
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 3.1.0   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2015-11-25 09:02 EST by Julien Dupont CLA
Modified: 2016-09-22 10:58 EDT (History)
2 users (show)

See Also:


Attachments
Bug with completion in precondition's field of Container Creation tool (10.14 KB, application/zip)
2015-11-25 09:02 EST, Julien Dupont CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Dupont CLA 2015-11-25 09:02:19 EST
Created attachment 258274 [details]
Bug with completion in precondition's field of Container Creation tool

During use a container creation tool if you try to know context in the precondition field, using for example feature: + "Ctrl + Space" the context return does not correct.
Context returned correspond to mapping of the container in creation but should be the element clicked.

Use examlple joins, 
Look the Container creation tool, in precondition field, use feature: + completion.
The context proposed by completion should be EPackage but it's EClass.
Comment 1 Florent Latombe CLA 2016-09-22 10:58:02 EDT
I have observed similar erroneous behaviors on "Edge Creation Tool" and "Node Creation Tool". The completion proposed for "self" by AQL or Acceleo3 is based on the type of the semantic element of the mapping(s) referenced by the tool ; while the real type of "self" is in fact that of the container that was clicked (as expected).

This explains why this issue does not impact the runtime and why starting any expression or model operation by setting yourself to context "var:container" (respectively "var:source", etc.) goes fine.

Workaround: don't use any expressions based on "self" in these tools, instead use "container", "source", etc. variables.

Note: this is on 3.1.3.201511201007