Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext builder: skip processing resource
Xtext builder: skip processing resource [message #717254] Fri, 19 August 2011 17:57 Go to next message
Timotei D is currently offline Timotei DFriend
Messages: 89
Registered: March 2010
Member
Hello!

In my projects I have a custom folder linked to outside the workspace.

Hoever, the xtext builder parses those files aswell. How can I make it skip that specific linked resource?

Thanks.
Re: Xtext builder: skip processing resource [message #717292 is a reply to message #717254] Fri, 19 August 2011 20:36 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13882
Registered: July 2009
Senior Member
Hi,

does customizing org.eclipse.xtext.resource.impl.DefaultResourceServiceProvider.canHandle(URI) help???

public class MyResourceServiceProvider extends DefaultResourceServiceProvider {

	@Override
	public boolean canHandle(URI uri) {
		if (true)
			return false;
		else
			return super.canHandle(uri);
	}
	
}


public class MyDslRuntimeModule extends org.xtext.example.mydsl.AbstractMyDslRuntimeModule {

	public Class<? extends IResourceServiceProvider> bindIResourceServiceProviderr() {
		return MyResourceServiceProvider.class;
	}
	
}


~Christian


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

[Updated on: Fri, 19 August 2011 20:38]

Report message to a moderator

Re: Xtext builder: skip processing resource [message #717378 is a reply to message #717292] Sat, 20 August 2011 09:03 Go to previous message
Timotei D is currently offline Timotei DFriend
Messages: 89
Registered: March 2010
Member
Hi!

Yeah, that's good. Thanks!

However, it seems that the URI are just resources. That is, instead of first supplying the directory parent of those files, the file get supplies directly. That's OK somehow, since I can still check if the file has my folder's name in the path, however, getting the 'canHandle' for each directory also would be great!

[Updated on: Sat, 20 August 2011 09:07]

Report message to a moderator

Previous Topic:Xcore, xbase and EObject literals
Next Topic:a question about linking
Goto Forum:
  


Current Time: Thu Apr 15 03:16:23 GMT 2021

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

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

Back to the top