Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » ResourceDescriptions in Validator
ResourceDescriptions in Validator [message #538122] Sat, 05 June 2010 11:29 Go to next message
Filip Kis is currently offline Filip KisFriend
Messages: 31
Registered: April 2010
Member
Hi!

I would need to get all the resources to do some complex checks in my JavaValidator.

However, the Injected IResourceDescriptions, although not null seem to be empty. I guess that the descriptions are not built yet at that point.

How might I get other resources in the validator to do my comparison?

Filip
Re: ResourceDescriptions in Validator [message #538184 is a reply to message #538122] Sun, 06 June 2010 07:27 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Filip Kis schrieb:
> Hi!
>
> I would need to get all the resources to do some complex checks in my
> JavaValidator.
> However, the Injected IResourceDescriptions, although not null seem to
> be empty. I guess that the descriptions are not built yet at that point.
> How might I get other resources in the validator to do my comparison?
>
> Filip

It should be filled, in which context do you use IResourceDescriptions
and to what implmentation is it bound?

Sven

--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: ResourceDescriptions in Validator [message #638496 is a reply to message #538184] Thu, 11 November 2010 14:03 Go to previous messageGo to next message
Filip Kis is currently offline Filip KisFriend
Messages: 31
Registered: April 2010
Member
Coming back to this topic.

I'm using it in <MyDSL>JavaValidator (for a check on one of my rules) and I'm trying to iterate over getAllResourceDescriptions(). It's bound to org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDesc riptions.

Now this normally works, however it doesn't work on a clean build (if I chose my project and run clean on it). In that case the getAllResourceDescriptions() won't return any resources.

This is kind of annoying because I get error markers (from Xtext Check (fast)) on files that are actually valid every time I clean or load a new project. And I can only remove them by re-triggering the validation (which only happens if I change something, anything, like adding whitespace, in the file).
Re: ResourceDescriptions in Validator [message #639463 is a reply to message #638496] Tue, 16 November 2010 16:37 Go to previous message
Benjamin Schwertfeger is currently offline Benjamin SchwertfegerFriend
Messages: 53
Registered: July 2009
Member
Hello Filip,
a very similar question is in thread http://www.eclipse.org/forums/index.php?t=msg&goto=63311 8 and the solution is to use different IResourceDescriptions in some circumstances.

Benjamin
Previous Topic:Where do I define new grammar?
Next Topic:[SOLVED] How to access to "com.google.inject.Injector.Injector" from JavaValidator
Goto Forum:
  


Current Time: Fri Apr 26 20:44:18 GMT 2024

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

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

Back to the top