Restrict Index (EObjectDescriptions) [message #1174768] |
Thu, 07 November 2013 04:55  |
Eclipse User |
|
|
|
Hello Guys,
I use Xtext to parse very large projects. Due to possible memory issues I want to limit the EObjectDescriptions to one Project and not as default to the entire Workspace. Could you tell me which class is responsible for that type of scoping?
Thank you...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Restrict Index (EObjectDescriptions) [message #1182626 is a reply to message #1182508] |
Tue, 12 November 2013 04:57  |
Eclipse User |
|
|
|
Thanks for your help!
This is what i achievied for now in the global scope provider to filter certain files:
@Override
protected IScope getScope(IScope parent, final Resource context, boolean ignoreCase, EClass type, Predicate<IEObjectDescription> filter) {
Predicate<IEObjectDescription> newFilter = new Predicate<IEObjectDescription>() {
public boolean apply(IEObjectDescription description) {
if(description.getEObjectURI().lastSegment().endsWith("tvs"))
return false;
return true;
}
};
IScope scope = super.getScope(parent, context, ignoreCase, type, newFilter);
return scope;
}
Is that a good idea? Is there an example maybe how to scope between files?
|
|
|
Powered by
FUDForum. Page generated in 0.05880 seconds