Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » No elements in the index when doing Project Clean(No model elements in the index (resourceDescriptions) when doing Project Clean)
No elements in the index when doing Project Clean [message #1741748] Mon, 29 August 2016 09:07 Go to next message
Oleg Cohen is currently offline Oleg CohenFriend
Messages: 34
Registered: August 2016
Member
Greetings,

I have an issue when I am doing project Clean and a full rebuild commences. When I infer types I need to look up in the global index to find an element. I do it this way:

resourceDescriptions.getExportedObjects(MyDslPackage.Literals.TYPE_X, elementQualifiedName, false).forEach [

var typeXObject = EcoreUtil.resolve(it.getEObjectOrProxy(), modelElement.eResource.resourceSet) as Type_X
]

When I invoke a build manually or modify/save a model file all works fine and the elements are found in the index.

When I run Project Clean, it cleans up the generated sources folder and then starts a full build. At that point the index isn't populated.

resourceDescriptions is wired into the Inferrer in the following way:

@Inject IResourceDescriptions resourceDescriptions

I would appreciate guidance on how to fix the issue.

Best regards,
Oleg Cohen

[Updated on: Mon, 29 August 2016 09:09]

Report message to a moderator

Re: No elements in the index when doing Project Clean [message #1741750 is a reply to message #1741748] Mon, 29 August 2016 09:21 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
are you sure you respect the inferrer phases?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: No elements in the index when doing Project Clean [message #1741787 is a reply to message #1741750] Mon, 29 August 2016 15:21 Go to previous messageGo to next message
Oleg Cohen is currently offline Oleg CohenFriend
Messages: 34
Registered: August 2016
Member
I am not entirely sure. Is there a good guide or a good example on how this must be done properly? At what phase does the index get built?

Thank you!
Oleg
Re: No elements in the index when doing Project Clean [message #1741788 is a reply to message #1741787] Mon, 29 August 2016 15:27 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
the esiest in you share a minimal example (e.g. based on domainmodel) reproducing your problem

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Quickfix for syntactical errors
Next Topic:xtext unnamed tree
Goto Forum:
  


Current Time: Fri Apr 19 09:56:25 GMT 2024

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

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

Back to the top