| Summary: | References to Ecore are not resolved correctly when generating ecore from xcore | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Ecoretools | Reporter: | Rainer Menke <rainer> | ||||||||
| Component: | General | Assignee: | Project Inbox <ecore-inbox> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | cedric.brun, mtaal | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | 3.0.0M6 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows 7 | ||||||||||
| See Also: |
https://git.eclipse.org/r/41651 https://git.eclipse.org/c/ecoretools/org.eclipse.ecoretools.git/commit/?id=0bfb9212a81b7bef85de37fe838bf11399b863a2 |
||||||||||
| Whiteboard: | |||||||||||
| Bug Depends on: | 458841 | ||||||||||
| Bug Blocks: | 423904 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Rainer Menke
Is ../../org.eclipse.emf.ecore/model/Ecore.ecore actually wrong? With Xcore, the inferred Ecore model does consistently always use the development time version of built-in models, so what you show is what I'd generally expect. So I wonder, how is it wrong? I.e., does it validate as invalid when opened in the Sample Ecore Editor? Created attachment 250336 [details]
Ecore diagrams of the models
Hi Ed, I agree to your point, that the inferred Ecore model does consistently always use the development time version of built-in models. But it seems for me, that there is something wrong. First I do not know, how to generate such model without typing it manually. Second, neither the Ecore Diagram Tools nor Acceleo can work with the ecore model, because they can not determine the type of TestString. From my point of view, either the generation possiblilities of xcore should be enhanced, that absolute instead of relativ URI can be used, or several components which are based on ecore models should behave in this way. Because you are much familiar with EMF and all dependent components than myself, perhaps you know, what would be the best way to solve the issue. Hi Ed, I played and changed a little bit. First, it is trivial, to generate a URI like you mentioned, by using the Load Resource option. But even after installing Sirius ( 2.0.3.201501210814 ) and the Ecore Diagram Editor ( 3.0.0.201412161004 ) it does not show the Etype. If the model opens without validation errors in the Sample Ecore Editor then it's a valid model. It may well be that other tools don't process it properly but that's a problem in that tool. Likely the problem is that the tool is calling the deprecated http://download.eclipse.org/modeling/emf/emf/javadoc/2.10.0/org/eclipse/emf/ecore/plugin/EcorePlugin.html#computePlatformURIMap%28%29 instead of the newer API or perhaps it isn't calling either one but should... So it seems better if the Ecore Tools guys have a look (because I won't be able to help until early March). Ed, you're probably right. I'll have a look. Rainer, can you tell me if the org.eclipse.sirius.common.xtext bundle (or the corresponding org.eclipse.sirius.runtime.ide.xtext feature) is in your environment? Hi Cédric, I have the following: Sirius Integration with XText 2.0.3.201501210814 org.eclipse.sirius.runtime.ide.xtext.feature.group and Sirius Core Runtime 2.0.3.201501210814 org.eclipse.sirius.runtime.feature.group from generating Ecore Diagrams installed. It looks like whatever "setup" EcoreTools was doing was un-done by Sirius. I tracked Bug 458841 I also found a mismatch in reflective code which would make the computePlatformURIMap(false) to be called in EcoreTools (hence commit 9d059eacbcbc4b9ab47b7bcbc095ee79ff1d6a1a on master) for EcoreTools Created attachment 250390 [details]
Diagram with fix of 458841 and EcoreTools master
New Gerrit change created: https://git.eclipse.org/r/41651 Gerrit change https://git.eclipse.org/r/41651 was merged to [master]. Commit: http://git.eclipse.org/c/ecoretools/org.eclipse.ecoretools.git/commit/?id=0bfb9212a81b7bef85de37fe838bf11399b863a2 *** Bug 423904 has been marked as a duplicate of this bug. *** Fixed for 3.0.0M6 |