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

Bug 462488

Summary: Validation complains about EStringToStringMapEntry.eContainer()
Product: [Modeling] Acceleo Reporter: Cedric Brun <cedric.brun>
Component: Query LanguageAssignee: Yvan Lussaud <yvan.lussaud>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.6.0   
Target Milestone: ---   
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/44611
https://git.eclipse.org/c/acceleo/org.eclipse.acceleo.git/commit/?id=a58681c6d8433d2418fd03513dcd467f00961310
https://git.eclipse.org/r/44722
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=5cbe2fd361c40a1dc1a25c0895b34c5037e16534
https://git.eclipse.org/r/46312
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=c7dfd3b35eac0bafb0e7be05f67d4b96b7ebfec3
Whiteboard:
Bug Depends on:    
Bug Blocks: 462490    

Description Cedric Brun CLA 2015-03-18 12:51:01 EDT
in ecore.odesign (which is in EcoreTools) 
I have an expression which is :

aql:source.eContainer(ecore::EAnnotation)
with source being of type EStringToStringMapEntry

AQL won't validate the expression, complaining about eContainer() not being defined for this type.

This type is defined as an EClass in ecore.core but *has an instance type name : java.util.Map$Entry* . I guess that's whats getting AQL's confused in some way.
Comment 1 Yvan Lussaud CLA 2015-03-23 09:47:54 EDT
I tested validation with the following types:

EClassifierType(EcorePackage.eINSTANCE.getEStringToStringMapEntry())
EClassifierLiteralType(EcorePackage.eINSTANCE.getEAnnotation())

And the service is found, I also get a EClassifierType(EcorePackage.eINSTANCE.getEAnnotation()) as validation result. 

Can you check parameters types on your side ?
Comment 2 Eclipse Genie CLA 2015-03-25 10:52:39 EDT
New Gerrit change created: https://git.eclipse.org/r/44611

WARNING: this patchset contains 2611 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 3 Eclipse Genie CLA 2015-03-26 09:24:47 EDT
Gerrit change https://git.eclipse.org/r/44611 was merged to [master].
Commit: http://git.eclipse.org/c/acceleo/org.eclipse.acceleo.git/commit/?id=a58681c6d8433d2418fd03513dcd467f00961310

WARNING: this patchset contains 2611 new lines of code and may require a Contribution Questionnaire (CQ) if the author is not a committer on the project. Please see:https://wiki.eclipse.org/Project_Management_Infrastructure/Creating_A_Contribution_Questionnaire
Comment 4 Cedric Brun CLA 2015-03-26 12:27:41 EDT
The merged patchset only setup the infrastructure needed to declare such exceptions.

In our case, it means calling:

queryEnvironment.registerCustomClassMapping(EcorePackage.eINSTANCE.getEStringToStringMapEntry(), EStringToStringMapEntryImpl.class);
Comment 5 Eclipse Genie CLA 2015-03-27 04:45:08 EDT
New Gerrit change created: https://git.eclipse.org/r/44722
Comment 7 Cedric Brun CLA 2015-04-23 04:47:44 EDT
For some reasons it looks like the customMapping declaration got lost in the many merge/rebases of the AQL branch of Sirius.

I will submit a new patchset to add the declaration.
Comment 8 Eclipse Genie CLA 2015-04-23 04:50:54 EDT
New Gerrit change created: https://git.eclipse.org/r/46312
Comment 10 Cedric Brun CLA 2015-04-23 07:56:10 EDT
Fixed for M7
Comment 11 Laurent Goubet CLA 2015-05-27 08:57:16 EDT
Closing resolved bugs