Bug 487316 - Drop description Precondition help does not list real available variables
Summary: Drop description Precondition help does not list real available variables
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Diagram (show other bugs)
Version: 3.1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks: 525257
  Show dependency tree
 
Reported: 2016-02-05 05:13 EST by Charlie Mordant CLA
Modified: 2017-09-27 03:49 EDT (History)
1 user (show)

See Also:


Attachments
Sample project to reproduce (3.04 KB, application/zip)
2016-02-09 10:55 EST, Esteban DUGUEPEROUX CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Mordant CLA 2016-02-05 05:13:10 EST
The help tooltip of the 'precondition' input for a drop description only list 'container' variable.

This variable isn't available but some other are. I listed:

* newViewContainer (shouldn't it be newContainerView as usual?)
* element

There can be many others...
Comment 1 Esteban DUGUEPEROUX CLA 2016-02-09 10:55:33 EST
Created attachment 259668 [details]
Sample project to reproduce

Hi Charlie,

I reproduce the issue at runtime.
Indeed the container variable is available at completion and validation doesn't detect this issue but at runtime this variable is not available.
While using for example "newSemanticContainer" variable which is declared in the tool, at runtime the precondition works correctly.

Scenario to reproduce :

1. Import the attached project
2. Open the odesign and the diagram
3. In the precondition of the drop tool, use completion with var: and aql: to see the presence of "container" variable while it should not appears
And see the missing others variables (oldSemanticContainer, newSemanticContainer, element, newContainerView)
4. At runtime test drag'n drop of EPackage in the diagram with the following expression :

"aql:container.oclIsKindOf(ecore::EPackage)"

=> KO the drag'n drop doesn't works, no exception is thrown in error log and odesign validation show no error. While without this expression the drop tool works fine.

5. Now test drag'n drop with the following expression :

"aql:newSemanticContainer.oclIsKindOf(ecore::EPackage)"

Now it works, at runtime "newSemanticContainer" variable is recognized while not at completion and validation.