| Change IResourceClusteringPolicy [message #1123426] |
Wed, 02 October 2013 10:53  |
Sergio Otero Messages: 19 Registered: June 2012 |
Junior Member |
|
|
Hi
I'm dealing with a very large grammar with complex scope rules and thousands of files to compile.
I'm able to work with a 8Gb Heap, but not all developers have this memory, so it would be nice to be able to compile with 2-4Gb, even if the same file has to be parsed several times because of dependencies.
I think that this can be done changing "IResourceClusteringPolicy clusteringPolicy" in "ClusteringBuilderState".
The default implementation is defined in the interface: "@ImplementedBy(DisabledClusteringPolicy.class)" and i want to try "DynamicResourceClusteringPolicy" or maybe a custom one.
I'm trying to change it in the language plugin project, in XXXRuntimeModule, where i have succesfully changed other guice dependencies like "IDefaultResourceDescriptionStrategy" and "IValueConverterService", but in this case it doesn't work.
Debugging i can see that only "DisabledClusteringPolicy" is used.
public class XXXRuntimeModule extends com.costaisa.dsl.AbstractXXXRuntimeModule {
@Override
public Class<? extends IValueConverterService> bindIValueConverterService() {
return XXXValueConverter.class;
}
public Class<? extends IDefaultResourceDescriptionStrategy> bindIDefaultResourceDescriptionStrategy() {
return XXXResourceDescriptionStrategy.class;
}
public Class<? extends IResourceClusteringPolicy> bindIResourceClusteringPolicy() {
return DynamicResourceClusteringPolicy.class;
}
}
Eclipse complains that "Discourage access: is not accesible due to restriction on required library", but debugging i can see that the class is instantiated.
Is there a solution apart from modifying the source code of xtext?
Thanks
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01951 seconds