| Summary: | With XCore models, datatypes (e.g. EInt) are displayed as "EJavaObject" and create errors | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Ecoretools | Reporter: | Erwan Bousse <erwan.bousse> | ||||||||
| Component: | General | Assignee: | Project Inbox <ecore-inbox> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | cedric.brun | ||||||||
| Version: | 2.0 | ||||||||||
| Target Milestone: | 3.0.0M6 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Bug Depends on: | 458841 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 247015 [details]
The Eclipse project with the Xcore file and the class diagram
Hi, and thanks for taking the time to report this. It is actually a problem in EcoreTools and not in Sirius, I will move the bugzilla there. Created attachment 247017 [details]
Details about the used eclipse installation
Thanks!
I'm also adding details about my eclipse installation (from "Help" -> "Installation details").
I could reproduce the problem thanks to your project, thanks for that. For "some reasons" the Ecore model which is getting computed by Xcore does not resolve to proper Ecore datatypes when loaded with Sirius (with or without the XTextResourceSet) In the same environment when I load the .xcore model in the reflective editor, the eType references are correctly resolved. After analysis, the Ecore reflective editor is able to resolve those links by using the XMLResource.OPTION_MISSING_PACKAGE_HANDLER. I could reuse the same support in EcoreTools. The only concern I have right now is that this API got introduced in EMF 2.9 and EcoreTools 2.0.x supports Eclipse 3.8 (and hence EMF 2.8) I need either to introduce a specific plugin or use Java reflexion to setup this when the option is present in EMF. commits moving forward by setting up the MISSING_PACKAGE_HANDLER: http://git.eclipse.org/c/ecoretools/org.eclipse.ecoretools.git/commit/?id=5915f7382de5237db84701c20dae9d79cb623115 (master) and http://git.eclipse.org/c/ecoretools/org.eclipse.ecoretools.git/commit/?h=2.0&id=59640e5973fb7b2d3b101b69bbffa5395b32a3bc (2.0) That being said, this scenario is not going to work until either Bug 450535 or Bug 443967 gets fixed in Sirius. Update : Bug 458621 made me go back to a long debugging session and have a better understanding of what's happening. Sirius is actually "resetting" all the URI mappings which got computed and registered by EcoreTools using the public static java.util.Map<URI,URI> computePlatformURIMap(boolean targetPlatform) This is not on purpose and was a side effect of instrumenting the URIConverters to get a proper progress-monitor feedback while loading. Just tracked Bug 458841 to keep track of this fix for Sirius This has been fixed in both EcoreTools 2.0.x maintenance stream and Sirius 2.0.x maintenance stream. http://download.eclipse.org/ecoretools/updates/nightly/2.0.x/luna http://download.eclipse.org/sirius/updates/nightly/2.0.x/luna Feel free to reopen if you experience this issue again. Thanks ! |
Created attachment 247014 [details] A screenshot with the error in the class diagram I have the following Ecore model written using XCore: ------------------ package root class A { refers B c } class B { } class C { int x } ------------------ 1) I right-click the .xcore file and choose "Initialise Ecore Diagram ...", which creates a .aird file. 2) I choose to represent a class diagram for the package "root", and I choose "Add related elements" to put A, B and C in the diagram. 3) A and B are displayed very nicely, including the reference. But C appears in red, with the attribute "x" being shown as typed by "EJavaObject" instead of "EInt". I've attached a screenshot, and in a second attachment i'll put the whole project.