| Summary: | Completion in a CreateLineTool does not display the correct context type. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Maxime Porhel <maxime.porhel> | ||||
| Component: | Table | Assignee: | Project Inbox <sirius.table-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | belqassim.djafer, laurent.redor, mickael.lanoe, pierre-charles.david | ||||
| Version: | 1.0.1 | Keywords: | triaged | ||||
| Target Milestone: | 3.0.0M5 | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Maxime Porhel
A pass on other tool and corresponding Tree tools could be done to find other similar errors. TableInterpretedTargetSwitch:
public Option<Collection<String>> caseCreateLineTool(CreateLineTool object) {
return globalSwitch.doSwitch(object.getMapping(), false);
}
We should not get the DomainClass of the mapping 'to create', but the domain class of the 'selected' element's mapping, i.e. object.eContainer().
See the other case methods to handle the precondition with the eContainer and decide what to do for other cases (operation done in the tools, ...)
the other tools in table, tree (and also Diagram) will have to be checked.
currently working on it Created attachment 249649 [details]
Sample VSM to reproduce the issue
Steps to reproduce using the attached VSM:
1. Open the VSM and go to the (only) line creation tool.
2. In the tool's precondition field, enter "[/]" and trigger the completion.
3. In the completion proposal, thisEObject appears to be typed as an EAttribute, which is the domain class of the line the tool will (maybe) create. It should be EClass, the domain class of the line mapping on which the tool will be invoked: testing a precondition only makes sense depending on the context (the EClass), not the on result (EAttribute), which does not even exist at pre-condition check time.
Fixed by fb742c840f580d48e27c07db11bc06b49a4a67ee. Verified on Sirius 3.0.0M6 Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0. |