Skip to main content



      Home
Home » Modeling » TMF (Xtext) » ResourceDescriptions in Validator
ResourceDescriptions in Validator [message #538122] Sat, 05 June 2010 07:29 Go to next message
Eclipse UserFriend
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 03:27 Go to previous messageGo to next message
Eclipse UserFriend
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 09:03 Go to previous messageGo to next message
Eclipse UserFriend
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 11:37 Go to previous message
Eclipse UserFriend
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 Jul 11 21:50:38 EDT 2025

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

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

Back to the top