Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 479019

Summary: Sirius Ecore models (diagram,tree) are not registered in the interpreter if no Viewpoint is enabled
Product: [Modeling] Sirius Reporter: Cedric Brun <cedric.brun>
Component: CoreAssignee: Project inbox <sirius.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: florian.barbin, maxime.porhel
Version: 3.0.0Keywords: triaged
Target Milestone: 3.1.0   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/57383
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=d727426be4cf852efe745f37f0d108979ae9a0c6
Whiteboard:
Bug Depends on:    
Bug Blocks: 478878    

Description Cedric Brun CLA 2015-10-05 04:46:55 EDT
This is a follow-up on Bug 461498.

The fix for the bug 461498 leveraged the MetamodelDescriptorProvider extension point by declaring implementers whithin Sirius itself which would systematically declare Sirius's ecore models.

Problem is : based on the way the extension point and API is designed, implementers are not called if no Viewpoint is selected which leads to the following scenario :

- open a modeling project with no enabled Viewpoints
- open the interpreter view and select a semantic element in the project
- write a query which needs some knownledge of the Sirius metamodels to be executed, for instance : aql:self.eInverse(diagram::DSemanticDiagram)
=> see that you get an error "invalid type literal" instead of having the result of the query.

The ability to evaluate such queries even when no Viewpoint has been selected if actually used quite a lot in the JUnit Unit tests of Sirius itself, in particular in all the DiagramIntegrityTestCase subclasses. This works in the case of Acceleo2/Query legacy as the implementation will try and look for the EPackage itself, though for AQL we chose to only rely on explicitely declared metamodels which means we can't migrate those tests to AQL unless we fix this issue.
Comment 1 Eclipse Genie CLA 2015-10-05 05:05:34 EDT
New Gerrit change created: https://git.eclipse.org/r/57383
Comment 2 Cedric Brun CLA 2015-10-06 10:15:12 EDT
See Bug 479153 tracking the removal of the MetamodelDescriptorProvider API  as it was in Sirius < 3.1.
Comment 4 Cedric Brun CLA 2015-10-06 11:27:44 EDT
Fixed for Sirius 3.1
Comment 5 Florian Barbin CLA 2015-10-09 09:02:30 EDT
Verified on 3.1.0.201510081411
Comment 6 Pierre-Charles David CLA 2015-10-16 09:12:49 EDT
Available in Sirius 3.1.0.