Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Have @Ecore and @GenModel disappeared from Xcore?
Have @Ecore and @GenModel disappeared from Xcore? [message #1129180] Tue, 08 October 2013 11:17 Go to next message
Istvan Rath is currently offline Istvan RathFriend
Messages: 59
Registered: July 2009
Member
Hi all,

the Xcore tutorial still contains references to @Ecore and @GenModel annotations, see e.g. http://wiki.eclipse.org/Xcore#Converting_a_GenModel_to_an_Xcore_Model

After an upgrade to Kepler SR1, I am getting the following errors on these annotations: "Couldn't resolve reference to XAnnotationDirective 'Ecore'. ". Additionally, when I open such files, a pop-up dialog appears, signaling the following:

An internal error occurred during: "Xtext validation".
No GenPackage found for org.eclipse.emf.ecore.impl.EPackageImpl@2dba51e6 (eProxyURI: platform:/resource/mypackage/model/mymodel.xcore#/EPackage)

Is this a bug (should I file a bugzilla), or am I missing something?

thanks
Istvan
Re: Have @Ecore and @GenModel disappeared from Xcore? [message #1129202 is a reply to message #1129180] Tue, 08 October 2013 11:49 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Istvan,

Comments below.

On 08/10/2013 1:17 PM, Istvan Rath wrote:
> Hi all,
>
> the Xcore tutorial still contains references to @Ecore and @GenModel
> annotations, see e.g.
> http://wiki.eclipse.org/Xcore#Converting_a_GenModel_to_an_Xcore_Model
>
> After an upgrade to Kepler SR1,
Upgrading from which version? During the Kepler release XcoreLang.xcore
was moved from org.eclipse.emf.ecore.xcore to
org.eclipse.emf.ecore.xcore.lib...
> I am getting the following errors on these annotations: "Couldn't
> resolve reference to XAnnotationDirective 'Ecore'. ". Additionally,
> when I open such files, a pop-up dialog appears, signaling the following:
>
> An internal error occurred during: "Xtext validation".
> No GenPackage found for
> mailto:org.eclipse.emf.ecore.impl.EPackageImpl@2dba51e6 (eProxyURI:
> platform:/resource/mypackage/model/mymodel.xcore#/EPackage)
>
> Is this a bug (should I file a bugzilla), or am I missing something?
It's hard to say, but it might be necessary to clean all projects to
rebuild the whole index. And personally I've had problems in general
with runtime workspaces that stop working when I update the bundle
versions in my workspace on which the runtime workspace depends. In
those cases I create a new workspace and import (with copying) all the
projects is the workspace that stopped working...
>
> thanks
> Istvan


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Have @Ecore and @GenModel disappeared from Xcore? [message #1129220 is a reply to message #1129202] Tue, 08 October 2013 12:12 Go to previous messageGo to next message
Istvan Rath is currently offline Istvan RathFriend
Messages: 59
Registered: July 2009
Member
Hi Ed,

Quote:
It's hard to say, but it might be necessary to clean all projects to
rebuild the whole index. And personally I've had problems in general
with runtime workspaces that stop working when I update the bundle
versions in my workspace on which the runtime workspace depends. In
those cases I create a new workspace and import (with copying) all the
projects is the workspace that stopped working...


it indeed seems to be a workspace-specific problem. I moved my projects to a new workspace and the problem went away. Thanks!

The question is then, which component has the bug? Ie. where is the cache that should be cleaned and rebuilt properly, but isn't?
Re: Have @Ecore and @GenModel disappeared from Xcore? [message #1129230 is a reply to message #1129220] Tue, 08 October 2013 12:26 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Istvan,

I suppose it's an Xtext bug, but I'm not sure. Clearly if some bundle
contributes resource description infrastructure that is used by Xtext to
build an index and that bundle changes versions, the index it built
might no longer be accurate with respect to the expectations of the new
version. Perhaps Xtext should be checking for the versions on startup
to know if reindexing is necessary...


On 08/10/2013 2:12 PM, Istvan Rath wrote:
> Hi Ed,
>
> Quote:
>> It's hard to say, but it might be necessary to clean all projects to
>> rebuild the whole index. And personally I've had problems in general
>> with runtime workspaces that stop working when I update the bundle
>> versions in my workspace on which the runtime workspace depends. In
>> those cases I create a new workspace and import (with copying) all
>> the projects is the workspace that stopped working...
>
>
> it indeed seems to be a workspace-specific problem. I moved my
> projects to a new workspace and the problem went away. Thanks!
>
> The question is then, which component has the bug? Ie. where is the
> cache that should be cleaned and rebuilt properly, but isn't?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Have @Ecore and @GenModel disappeared from Xcore? [message #1129240 is a reply to message #1129230] Tue, 08 October 2013 12:44 Go to previous messageGo to next message
Istvan Rath is currently offline Istvan RathFriend
Messages: 59
Registered: July 2009
Member
Ed,

do you know of some way the Xtext reindexing mechanism can be triggered programmatically? This would also be useful for many other purposes too.

thanks
Istvan
Re: Have @Ecore and @GenModel disappeared from Xcore? [message #1129252 is a reply to message #1129240] Tue, 08 October 2013 12:53 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Istvan,

Best to ask such things on the TMF forum...


On 08/10/2013 2:44 PM, Istvan Rath wrote:
> Ed,
>
> do you know of some way the Xtext reindexing mechanism can be
> triggered programmatically? This would also be useful for many other
> purposes too.
>
> thanks
> Istvan


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Have @Ecore and @GenModel disappeared from Xcore? [message #1129359 is a reply to message #1129230] Tue, 08 October 2013 14:54 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

There are all sorts of hard bugs for unusual increments; changing GIT
branches so that you have backwards time changes is particularly
troublesome and sometimes files aren't even refreshed. So this kind of
bug can be platform or GIT or JDT or project-specific builder. Always
safest to do at least a Clean All after a non-trivial change.

Regards

Ed Willink


On 08/10/2013 13:26, Ed Merks wrote:
> Istvan,
>
> I suppose it's an Xtext bug, but I'm not sure. Clearly if some bundle
> contributes resource description infrastructure that is used by Xtext
> to build an index and that bundle changes versions, the index it built
> might no longer be accurate with respect to the expectations of the
> new version. Perhaps Xtext should be checking for the versions on
> startup to know if reindexing is necessary...
>
>
> On 08/10/2013 2:12 PM, Istvan Rath wrote:
>> Hi Ed,
>>
>> Quote:
>>> It's hard to say, but it might be necessary to clean all projects to
>>> rebuild the whole index. And personally I've had problems in general
>>> with runtime workspaces that stop working when I update the bundle
>>> versions in my workspace on which the runtime workspace depends. In
>>> those cases I create a new workspace and import (with copying) all
>>> the projects is the workspace that stopped working...
>>
>>
>> it indeed seems to be a workspace-specific problem. I moved my
>> projects to a new workspace and the problem went away. Thanks!
>>
>> The question is then, which component has the bug? Ie. where is the
>> cache that should be cleaned and rebuilt properly, but isn't?
>
Re: Have @Ecore and @GenModel disappeared from Xcore? [message #1129962 is a reply to message #1129359] Wed, 09 October 2013 05:23 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Ed,

Well, there's a difference between what you do in your development
workspace and how that impacts your runtime workspace. I've had
situations (just yesterday in fact) where the runtime workspace just
won't launch, so no opportunity to do refreshing or cleaning. That's
quite annoying and for less expert users, they might not consider to
create a new workspace and import all their old projects into the new
one, which is easy only if all the projects are physically nested in the
workspace, not if they're linked...


On 08/10/2013 4:54 PM, Ed Willink wrote:
> Hi
>
> There are all sorts of hard bugs for unusual increments; changing GIT
> branches so that you have backwards time changes is particularly
> troublesome and sometimes files aren't even refreshed. So this kind of
> bug can be platform or GIT or JDT or project-specific builder. Always
> safest to do at least a Clean All after a non-trivial change.
>
> Regards
>
> Ed Willink
>
>
> On 08/10/2013 13:26, Ed Merks wrote:
>> Istvan,
>>
>> I suppose it's an Xtext bug, but I'm not sure. Clearly if some
>> bundle contributes resource description infrastructure that is used
>> by Xtext to build an index and that bundle changes versions, the
>> index it built might no longer be accurate with respect to the
>> expectations of the new version. Perhaps Xtext should be checking
>> for the versions on startup to know if reindexing is necessary...
>>
>>
>> On 08/10/2013 2:12 PM, Istvan Rath wrote:
>>> Hi Ed,
>>>
>>> Quote:
>>>> It's hard to say, but it might be necessary to clean all projects
>>>> to rebuild the whole index. And personally I've had problems in
>>>> general with runtime workspaces that stop working when I update the
>>>> bundle versions in my workspace on which the runtime workspace
>>>> depends. In those cases I create a new workspace and import (with
>>>> copying) all the projects is the workspace that stopped working...
>>>
>>>
>>> it indeed seems to be a workspace-specific problem. I moved my
>>> projects to a new workspace and the problem went away. Thanks!
>>>
>>> The question is then, which component has the bug? Ie. where is the
>>> cache that should be cleaned and rebuilt properly, but isn't?
>>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Have @Ecore and @GenModel disappeared from Xcore? [message #1129985 is a reply to message #1129962] Wed, 09 October 2013 05:53 Go to previous messageGo to next message
Istvan Rath is currently offline Istvan RathFriend
Messages: 59
Registered: July 2009
Member
Quote:
I've had
situations (just yesterday in fact) where the runtime workspace just
won't launch, so no opportunity to do refreshing or cleaning. That's
quite annoying and for less expert users, they might not consider to
create a new workspace and import all their old projects into the new
one, which is easy only if all the projects are physically nested in the
workspace, not if they're linked...


In my situation, even cleaning the workspace (which was not a runtime workspace, but my regular development workspace) didn't help. I also tried switching compiler compliance levels back and forth to trigger a complete rebuild - no result. So the only solution was to move stuff to a new workspace.

I entirely agree with Ed (Merks) that this is a major annoyance, especially when working with Git where the best practice is (used to be) to maintain a single local repository clone and link projects to your various workspaces from there. For novice users (as I have seen with my students), such issues are especially daunting since the way they manifest (i.e. cryptic error messages, validation errors etc) do not hint at how the issue should be resolved.

I asked about triggering the Xtext indexer in the TMF forum. Let's see if the guys there can help.
Re: Have @Ecore and @GenModel disappeared from Xcore? [message #1130036 is a reply to message #1129985] Wed, 09 October 2013 07:03 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

It seems I missed some underlying details.

I had some similar experiences during Kepler M upgrades; a workspace got
totally trashed and recreating all the pieces was a pain. Somehow a
critical record in .metadata/org.eclipse.e4.workbench/workbench.xmi was
missing. When it happened again I managed to tickle workbench.xmi and
was lucky to recover.

While I'm fairly sure there are some performance issues with the Xtext
indexer to solve, this just doesn't smell like one of them and
..metadata/org.eclipse.xtext.builder is empty on my machine. For a
determinedly broken workspace, look to the workspace.

Regards

Ed Willink


On 09/10/2013 06:53, Istvan Rath wrote:
> I entirely agree with Ed (Merks) that this is a major annoyance
Previous Topic:EMF artifacts on Maven Central
Next Topic:GMF Diagram performance
Goto Forum:
  


Current Time: Fri Mar 29 13:43:33 GMT 2024

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

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

Back to the top