Bug 468436 - Invalid computed context type in tool operation and precondition
Summary: Invalid computed context type in tool operation and precondition
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: 2.0.4   Edit
Hardware: All All
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Maxime Porhel CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on: 465421
Blocks: 542859
  Show dependency tree
 
Reported: 2015-05-27 03:44 EDT by Maxime Porhel CLA
Modified: 2018-12-17 11:25 EST (History)
2 users (show)

See Also:


Attachments
VSM exposing the self type issue. (35.04 KB, application/octet-stream)
2015-05-27 03:44 EDT, Maxime Porhel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Porhel CLA 2015-05-27 03:44:10 EDT
Created attachment 253818 [details]
VSM exposing the self type issue.

On Node and Container creation tools: the initial inferred value of var:self for the first model operation should be the same than var:container (See TaskHelper.buildTaskFromModelOperation callers)

To reproduce: 
 . expand in ShouldBeValid section
 . in "Check Node variables types are infered"
   . ChangeContext var:self
     . ChangeContext var:self -> add a ChangeContext featureOwnedInteractions (like the var:container)

 . in "Check variables types with multiple self types"
   . ChangeContext var:self
     . ChangeContext var:self -> add a ChangeContext featureOwnedInteractions (like the var:container)

 . validate the section: the inferred type for self should be Model and not Interaction/Particant with the resulting "no ownedInteractions feature" validation error  error.


Discovered during validation of Bug 465421
Comment 1 Maxime Porhel CLA 2015-05-27 04:02:06 EDT
The var:container type computation done in DiagramInterpretedExpressionQuery.getAvailableVariable is correct. 

The DiagramInterpretedExpressionQuery.getTargetDomainClasses() is not correct at least for the context/self type of NodeCreationDescription/ContainerCreationDescription model operations and also for their precondition. 

The other tools will have to be checked. 

See org.eclipse.sirius.diagram.business.api.query.MappingBasedToolDescriptionQuery.getMappings(), the mappings and the extra mapping of the tools are used in the same level to take their domain class, but for the Node/ContainerCreation we want the domain class of the extra mappings (on which the tool is active without any check on the mapping structure) and the domain class of the container/user of the mappings referenced in the tool : the current diagram description or the parent mapping or the mappping which reuse the referenced mappings.
Comment 2 Pierre-Charles David CLA 2015-06-23 10:44:47 EDT
I'm keeping this in 3.1 because it continues the 3.0 theme of "more precise validation of the VSMs", but with reduced priority. It may slip to 4.0 if we can't find time for it.
Comment 3 Pierre-Charles David CLA 2015-12-15 04:10:57 EST
Moving out of the 4.0 scope for now, along with all the other issues which were there "by default". This does not mean some of these will not be re-integrated at some point, but for now these issues are not part of the roadmap for 4.0.

If you feel strongly about this removal from 4.0 and/or are ready to sponsor the corresponding work, feel free to comment.