Community
Participate
Working Groups
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.
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