|
|
|
Re: How to resolve cross-references from xtext to xmi? [message #742515 is a reply to message #742502] |
Thu, 20 October 2011 15:06 |
|
Hi,
the following works for me
public static void main(String[] args) throws IOException {
Injector injector = new MyDslStandaloneSetup().createInjectorAndDoEMFRegistration();
ResourceSet resourceSet = injector.getInstance(XtextResourceSet.class);
Resource xtextResource = resourceSet.getResource(URI.createURI("src/test.mydsl"), true);
xtextResource.load(null);
EcoreUtil.resolveAll(xtextResource);
Resource xmiResource = resourceSet.createResource(URI.createURI("src/test.xmi"));
xmiResource.getContents().add(xtextResource.getContents().get(0));
xmiResource.save(null);
}
~Christian
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.24076 seconds