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

Bug 315193

Summary: Wizard "Xtext Project From Existing Ecore Models" can not handle several packages of the same ecore model
Product: [Modeling] TMF Reporter: Frank Kühnlenz <f.kuehnlenz>
Component: Xtext BacklogAssignee: Project Inbox <tmf.xtext-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P5 CC: sforbes
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Frank Kühnlenz CLA 2010-06-01 08:11:33 EDT
Build Identifier: I20100520-1744

My existing ecore model has several packages:
-    root_package
--    package_A
--    package_B
--    package_C

and within package A classes from package B and C are referenced.

Now I used the project creation wizard "Xtext Project From Existing
Ecore Models" with the root_package as default package.

The generated xtext file contains now three imports:

import "platform:/resource/testProject/test.ecore" as package_A
import "platform:/resource/testProject/test.ecore" as package_B
import "platform:/resource/testProject/test.ecore" as package_C

But there are error messages on that import statements:
"EPackage [...] is used twice."

I posted it in the newsgroup eclipse.modeling.tmf and got this answer by Sven Efftinge:

That's a bug in the wizard (please file a bug report).
You need to add the fragment part to the URIs. They should looke like
this:

platform:/resource/testProject/test.ecore#//package_A

Reproducible: Always

Steps to Reproduce:
1. have an ecore model with several packages
2. use the wizard "Xtext Project From Existing Ecore Models"