| Summary: | A reference in an instance of http://www.eclipse.org/emf/2002/GenModel is wrongly seen as having a null type. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Acceleo | Reporter: | Romain Guider <romain.guider> | ||||
| Component: | Core | Assignee: | Project Inbox <acceleo-inbox> | ||||
| Status: | CLOSED WORKSFORME | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | stephane.begaudeau | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Romain Guider
Created attachment 178792 [details]
Acceleo template that illustrates the bug and allows reproducing it
if "[genModel.genPackages.ecorePackage->first()/]" generate the same thing for me: "org.eclipse.emf.ecore.impl.EPackageImpl@7be2149c (name: scala) (nsURI: http://github.com/sbegaudeau/acceleo/scalametamodel/2011/01, nsPrefix: scala)" And "[genModel.genPackages.ecorePackage.name->first()/]" generate what I am expecting: "scala". I tried both ways: - [genModel.genPackages.ecorePackage.name->first()/] and - [getFirstPackage(genModel).name/] - [query public getFirstPackage(genModel : GenModel) : EPackage = genModel.genPackages.ecorePackage->first()/] And the result is the same. since both are doing the same thing. Are you sure, that you did not change your metamodel between the execution ? Since your metamodel seems to have a valid name "kparser", I don't see why this: "[genModel.genPackages.ecorePackage.name->first()/]" would not work expect in a query. I'll close this bug for now, if you can reproduce it reopen it. |