Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » EMF Ecore imported from a different location
EMF Ecore imported from a different location [message #677206] Tue, 07 June 2011 20:07 Go to next message
Mary Komor is currently offline Mary KomorFriend
Messages: 61
Registered: July 2009
Member
In my grammar file, I have the import statement "import
"http://www.eclipse.org/emf/2002/Ecore" as ecore". This works fine in
Eclipse 3.6.2 + Xtext 1.0.2, but I am getting the following error in Eclipse
3.7 RC3 + Xtext 2.0:

The referenced package 'http://www.eclipse.org/emf/2002/Ecore' was imported
from a different location. Here:
'platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore

Is Ecore.ecore being implicitly imported? I tried commenting out the import,
but then I get errors on references to ecore::EInt for example.

Mary
Re: EMF Ecore imported from a different location [message #677242 is a reply to message #677206] Tue, 07 June 2011 22:05 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Mary,

please make sure that other imported packages refer to the ecore package
that is registered instead of the one from your workspace.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 07.06.11 22:07, schrieb Mary Komor:
> In my grammar file, I have the import statement "import
> "http://www.eclipse.org/emf/2002/Ecore" as ecore". This works fine in
> Eclipse 3.6.2 + Xtext 1.0.2, but I am getting the following error in
> Eclipse 3.7 RC3 + Xtext 2.0:
>
> The referenced package 'http://www.eclipse.org/emf/2002/Ecore' was
> imported from a different location. Here:
> 'platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore
>
> Is Ecore.ecore being implicitly imported? I tried commenting out the
> import, but then I get errors on references to ecore::EInt for example.
>
> Mary
Re: EMF Ecore imported from a different location [message #677267 is a reply to message #677242] Wed, 08 June 2011 00:00 Go to previous messageGo to next message
Mary Komor is currently offline Mary KomorFriend
Messages: 61
Registered: July 2009
Member
Hi Sebastian,

I hunted down all the references to workspace version of the EMF Ecore model
and changed them to the registered version. The error is now gone! Do you
know if this is new in Eclipse 3.7?

Thanks for your help!

Mary

"Sebastian Zarnekow" <Sebastian.Zarnekow@itemis.de> wrote in message
news:ism6lm$6cf$2@news.eclipse.org...
> Hi Mary,
>
> please make sure that other imported packages refer to the ecore package
> that is registered instead of the one from your workspace.
>
> Regards,
> Sebastian
> --
> Need professional support for Eclipse Modeling?
> Go visit: http://xtext.itemis.com
>
> Am 07.06.11 22:07, schrieb Mary Komor:
>> In my grammar file, I have the import statement "import
>> "http://www.eclipse.org/emf/2002/Ecore" as ecore". This works fine in
>> Eclipse 3.6.2 + Xtext 1.0.2, but I am getting the following error in
>> Eclipse 3.7 RC3 + Xtext 2.0:
>>
>> The referenced package 'http://www.eclipse.org/emf/2002/Ecore' was
>> imported from a different location. Here:
>> 'platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore
>>
>> Is Ecore.ecore being implicitly imported? I tried commenting out the
>> import, but then I get errors on references to ecore::EInt for example.
>>
>> Mary
>
>
Re: EMF Ecore imported from a different location [message #677309 is a reply to message #677267] Wed, 08 June 2011 06:24 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Mary,

the validation rule is new in Xtext 2.0 and helps to get rid of
duplicate epackages in a single resource set, e.g. a super grammar
imports a package with platform:/resource and the subgrammar uses an ns uri.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 08.06.11 02:00, schrieb Mary Komor:
> Hi Sebastian,
>
> I hunted down all the references to workspace version of the EMF Ecore
> model and changed them to the registered version. The error is now gone!
> Do you know if this is new in Eclipse 3.7?
>
> Thanks for your help!
>
> Mary
>
> "Sebastian Zarnekow" <Sebastian.Zarnekow@itemis.de> wrote in message
> news:ism6lm$6cf$2@news.eclipse.org...
>> Hi Mary,
>>
>> please make sure that other imported packages refer to the ecore
>> package that is registered instead of the one from your workspace.
>>
>> Regards,
>> Sebastian
>> --
>> Need professional support for Eclipse Modeling?
>> Go visit: http://xtext.itemis.com
>>
>> Am 07.06.11 22:07, schrieb Mary Komor:
>>> In my grammar file, I have the import statement "import
>>> "http://www.eclipse.org/emf/2002/Ecore" as ecore". This works fine in
>>> Eclipse 3.6.2 + Xtext 1.0.2, but I am getting the following error in
>>> Eclipse 3.7 RC3 + Xtext 2.0:
>>>
>>> The referenced package 'http://www.eclipse.org/emf/2002/Ecore' was
>>> imported from a different location. Here:
>>> 'platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore
>>>
>>> Is Ecore.ecore being implicitly imported? I tried commenting out the
>>> import, but then I get errors on references to ecore::EInt for example.
>>>
>>> Mary
>>
>>
Re: EMF Ecore imported from a different location [message #677478 is a reply to message #677309] Wed, 08 June 2011 15:53 Go to previous message
Mary Komor is currently offline Mary KomorFriend
Messages: 61
Registered: July 2009
Member
Thanks for the confirmation, Sebastian.

Mary

"Sebastian Zarnekow" <Sebastian.Zarnekow@itemis.de> wrote in message
news:isn3s0$1no$1@news.eclipse.org...
> Hi Mary,
>
> the validation rule is new in Xtext 2.0 and helps to get rid of duplicate
> epackages in a single resource set, e.g. a super grammar imports a package
> with platform:/resource and the subgrammar uses an ns uri.
>
> Regards,
> Sebastian
> --
> Need professional support for Eclipse Modeling?
> Go visit: http://xtext.itemis.com
>
> Am 08.06.11 02:00, schrieb Mary Komor:
>> Hi Sebastian,
>>
>> I hunted down all the references to workspace version of the EMF Ecore
>> model and changed them to the registered version. The error is now gone!
>> Do you know if this is new in Eclipse 3.7?
>>
>> Thanks for your help!
>>
>> Mary
>>
>> "Sebastian Zarnekow" <Sebastian.Zarnekow@itemis.de> wrote in message
>> news:ism6lm$6cf$2@news.eclipse.org...
>>> Hi Mary,
>>>
>>> please make sure that other imported packages refer to the ecore
>>> package that is registered instead of the one from your workspace.
>>>
>>> Regards,
>>> Sebastian
>>> --
>>> Need professional support for Eclipse Modeling?
>>> Go visit: http://xtext.itemis.com
>>>
>>> Am 07.06.11 22:07, schrieb Mary Komor:
>>>> In my grammar file, I have the import statement "import
>>>> "http://www.eclipse.org/emf/2002/Ecore" as ecore". This works fine in
>>>> Eclipse 3.6.2 + Xtext 1.0.2, but I am getting the following error in
>>>> Eclipse 3.7 RC3 + Xtext 2.0:
>>>>
>>>> The referenced package 'http://www.eclipse.org/emf/2002/Ecore' was
>>>> imported from a different location. Here:
>>>> 'platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore
>>>>
>>>> Is Ecore.ecore being implicitly imported? I tried commenting out the
>>>> import, but then I get errors on references to ecore::EInt for example.
>>>>
>>>> Mary
>>>
>>>
>
Previous Topic:[Xtext 2] generated artifacts for the tests plugin
Next Topic:[Xtext 2] Modify the behavior of the builder participant
Goto Forum:
  


Current Time: Wed Sep 25 00:15:58 GMT 2024

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

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

Back to the top