Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Xcore referencing another xcore => Same name URI for Ecore.ecore
Xcore referencing another xcore => Same name URI for Ecore.ecore [message #1097950] Fri, 30 August 2013 11:35 Go to next message
Sébastien Pirlot is currently offline Sébastien PirlotFriend
Messages: 6
Registered: October 2012
Junior Member
Hello,

I have defined an xcore A in project A and an xcore B in project B. In both project I generate the corresponding ecore and genmodel.

Inside xcore B, I import a class CA found in A then I define a new class extending CA.

Problem: I get an error inside the genmodel for B:
"The package 'archive:/file:/<emfJarPath>/model/Ecore.ecore#' has the same namespace URI 'http://www.eclipse.org/emf/2002/Ecore' as package 'platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#/'

I get no error if I don't reference A. Also in the genmodel wizard, in Referenced generator models, I select Ecore('org.eclipse.emf.ecore' plugin) and not Ecore(archive:/file:/<emfJarPath>/model/Ecore.genmodel) which is selected by default. I don't want to have hardcoded local paths.

I have no idea what's the problem, can you help?
Thanks a lot!
Sébastien
Re: Xcore referencing another xcore =&gt; Same name URI for Ecore.ecore [message #1098464 is a reply to message #1097950] Sat, 31 August 2013 05:08 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33147
Registered: July 2009
Senior Member
Sébastien,

Comments below.

On 30/08/2013 1:36 PM, Sébastien Pirlot wrote:
> Hello,
>
> I have defined an xcore A in project A and an xcore B in project B. In
> both project I generate the corresponding ecore and genmodel.
Why do you generated an Ecore and GenModel? Indexing is likely to get
confused by the presence of both the *.genmodel and the *.xcore defining
the same model with the same nsURI.
>
> Inside xcore B, I import a class CA found in A then I define a new
> class extending CA.
>
> Problem: I get an error inside the genmodel for B:
> "The package 'archive:/file:/<emfJarPath>/model/Ecore.ecore#' has the
> same namespace URI 'http://www.eclipse.org/emf/2002/Ecore' as package
> 'platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#/'
How did you set up the classpath for each of the two projects?
>
> I get no error if I don't reference A. Also in the genmodel wizard, in
> Referenced generator models, I select Ecore('org.eclipse.emf.ecore'
> plugin) and not
> Ecore(archive:/file:/<emfJarPath>/model/Ecore.genmodel) which is
> selected by default. I don't want to have hardcoded local paths.
>
> I have no idea what's the problem, can you help?
Sounds like an issue with setting up the classpaths inconsistently and I
don't see why you'd produce a GenModel...
> Thanks a lot!
> Sébastien


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Xcore referencing another xcore =&gt; Same name URI for Ecore.ecore [message #1103003 is a reply to message #1098464] Fri, 06 September 2013 09:34 Go to previous message
Sébastien Pirlot is currently offline Sébastien PirlotFriend
Messages: 6
Registered: October 2012
Junior Member
Hi,

I agree that generating xcore and genmodel was not appropriate.

My problem is that I have an old generated editor from ecore (hightly tweaked!). When I try to load a resource, it will fail if it's an xcore but succeed if it's an ecore. Since all our new developments are done using xcore, I thought I could generate the corresponding ecore and load it as a resource in my old editor. But this created the problems I posted above.

So after your reply, I started playing a lot trying to load an xcore resource into a generated editor and found a strange issue. I created another topic for it: http://www.eclipse.org/forums/index.php/m/1102991/#msg_1102991

If I manage loading an xcore as a resource in the editor, it would solve all my problems Smile

[Updated on: Fri, 06 September 2013 09:35]

Report message to a moderator

Previous Topic:Exporting a default EMF editor as an eclipse product
Next Topic:Dynamically extending a non-dynamic abstract EClass
Goto Forum:
  


Current Time: Sat May 11 19:41:10 GMT 2024

Powered by FUDForum. Page generated in 0.03435 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top