Standalone generator & models in multiple jars [message #1061937] |
Tue, 04 June 2013 20:38  |
Eclipse User |
|
|
|
Hi,
I have two projects both containing files for a DSL I've designed. I'm using maven and have declared the dependency as required. The base project packages the DSL files inside the jar artifact that gets generated.
I get an error when invoking from maven and I try to load a DSL file that references elements that are in the jar file of the project dependency.
I'm using the code below:
Provider<XtextResourceSet> resourceSetProvider
.....
XtextResourceSet resourceSet = resourceSetProvider.get();
resourceSet.addLoadOption(XtextResource.OPTION_RESOLVE_ALL, Boolean.TRUE);
// Iterate through all the files in a configured directory and add to resource
URI uri = URI.createURI(file.getPath());
resourceSet.getResource(uri, true);
I thought that by setting OPTION_RESOLVE_ALL Xtext will index the classpath to find the DSL resources.
So, if I don't know the name of the jar files in advance, is there a way to tell Xtext to scan the classpath and find the DSL resources? Eclipse does it in a way as I'm able to navigate from a DSL file in one project to another project even with "workspace resolution" disabled.
Any help will be appreciated.
Thanks, Karel
|
|
|
|
Powered by
FUDForum. Page generated in 0.06454 seconds