| Summary: | [Move to EMF Facet] Fails to load catalog elements because metamodel is overwritten by AcceleoBuilder | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] MoDisco | Reporter: | Nicolas Bros <nicolas.bros> | ||||||||
| Component: | Infrastructure | Assignee: | Project Inbox <modisco.web-inbox> | ||||||||
| Status: | NEW --- | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P5 | CC: | gdupe | ||||||||
| Version: | 0.8.0 | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Nicolas Bros
Created attachment 167459 [details]
stacktrace
*** Bug 305831 has been marked as a duplicate of this bug. *** Created attachment 181087 [details]
patch
Anyway, here is a patch that fixes the problem, by removing only javadoc comments as the comment suggests, and putting back removed comments in the unhandled comments list.
Scratch that! Wrong bug. Created attachment 181165 [details] example project Here is a project that shows the problem: - Import project bug312050 from the attached zip - open A.xmi in the model browser - Add the single instance of metaclass A in this model to the Query Execution view - execute query A::myQuery2 using the Query Execution view you get a message in the log giving the identity of the metaclass: metaclass A: org.eclipse.emf.ecore.impl.EClassImpl@461984 - Do "Project > Clean..." on the bug312050 project - the query A::myQuery2 disappears from the Query Execution View, because the metamodel changed, and the instance of metaclass A that was added in the view is suddenly no more an instance of the metaclass A in the re-loaded metamodel. So, the query is not applicable to it anymore. - close and re-open A.xmi - Add the single instance of metaclass A in this model to the Query Execution view - execute query A::myQuery2 using the Query Execution view you get a new message in the log, with a different ID for the metaclass, indicating it is not the same metaclass anymore: metaclass A: org.eclipse.emf.ecore.impl.EClassImpl@1be72d6 Actually, this is not conclusive, because A.xmi contains a dynamic instance. I need to find a better example. See: org.eclipse.acceleo.common.utils.ModelUtils.registerEcorePackages(String pathName). This is where Acceleo registers the EPackages. We will switch to EMF Facet before to try to solve such bugs. => P5 |