Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to I force a re-validation of all xtext resources in a given project/workspace
How to I force a re-validation of all xtext resources in a given project/workspace [message #1172817] Wed, 06 November 2013 05:11 Go to next message
Chris Ainsley is currently offline Chris AinsleyFriend
Messages: 78
Registered: March 2010
Location: UK
Member
Two quick questions:


  1. How to I programatically force a re-validation of all xtext resources in a given project/workspace?
  2. Not strictly an xtext question, but how do I iterate over all resources with a given suffix in a given workspace and/or project?


Thanks,

C
Re: How to I force a re-validation of all xtext resources in a given project/workspace [message #1173762 is a reply to message #1172817] Wed, 06 November 2013 18:49 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13493
Registered: July 2009
Senior Member
HI,

triggering a full build on the project is not an option?
you could use an IResourceVisitor for the traversal


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Wed, 06 November 2013 18:50]

Report message to a moderator

Re: How to I force a re-validation of all xtext resources in a given project/workspace [message #1176448 is a reply to message #1173762] Fri, 08 November 2013 10:40 Go to previous messageGo to next message
Chris Ainsley is currently offline Chris AinsleyFriend
Messages: 78
Registered: March 2010
Location: UK
Member
Hello,

I've managed to wire up a full rebuild which occurs on the saving of certain resources that are external (but required) to the DSL processing.

Now, the problem is that a full clean and rebuild doesn't cleardown errors and create new errors as it should (programatically or manually via the Project/Clean option.

If I wish to cleardown linking errors then I have to go into the file where the error is and either press space a few times or select the "validate" option.

I guess my question is then, other than cleaning the whole project (which doesn't work), how to I force a full re-evaluation of all the Xtext resources in the workspace?

Chris
Re: How to I force a re-validation of all xtext resources in a given project/workspace [message #1176467 is a reply to message #1176448] Fri, 08 November 2013 10:53 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13493
Registered: July 2009
Senior Member
Hi,

a clean build actually does this for normal and fast checks.
to trigger the expensive checks automatically you have to build something yourself.


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to I force a re-validation of all xtext resources in a given project/workspace [message #1176511 is a reply to message #1176467] Fri, 08 November 2013 11:30 Go to previous messageGo to next message
Chris Ainsley is currently offline Chris AinsleyFriend
Messages: 78
Registered: March 2010
Location: UK
Member
Yes, that's what I want to do, I want to clear the whole state.

This is not a common use scenario. I have a file format which configures the whole behaviour of XText, and when the file changes, I need to trigger a revalidation of everything. Like I say, the "cleaning" approach does not seem to work (in my use case), so I need the nuclear option.


Something like;

for (IProject p : ....) {

    xxxxx.clearCache(p);
    xxxxx.revalidate(p);
}


(I'm guessing here)
Re: How to I force a re-validation of all xtext resources in a given project/workspace [message #1176523 is a reply to message #1176511] Fri, 08 November 2013 11:38 Go to previous message
Chris Ainsley is currently offline Chris AinsleyFriend
Messages: 78
Registered: March 2010
Location: UK
Member
Problem solved:

http://s22.postimg.org/itlawdott/doh.png

It seems that I managed to toggle the Xtext builder off somehow, but I guess it still did validation on a per-file basis even with it switched off.

Thanks for your help Christian.
Previous Topic:Abstract*RuntimeModule generation woes
Next Topic:Customizable formatting
Goto Forum:
  


Current Time: Sat Jul 11 06:09:48 GMT 2020

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

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

Back to the top