Cross linking multiple DSLs in Web Editor [message #1732933] |
Mon, 23 May 2016 04:26 |
Eclipse User |
|
|
|
Hi
I am trying to link my dsl with its underlying dependencies from other dsls while creating a web editor. I have gone through the thread https://www.eclipse.org/forums/index.php?t=msg&th=1076162&goto=1728201&
I am trying to customise https://github.com/eclipse/xtext/blob/master/web/org.eclipse.xtext.web.example.jetty/src/main/webapp/ace-statemachine-resource-multi.html to suit my needs. What I am trying to do is to link left.statemachine with right.statemachine before its loaded on the web-editor
As suggested in this by Christian in the thread, I tried to load all the files in the same resource set but this did not work. This is what I added in MyXtextServlet.java
XtextResourceSet resourceSet = injector.getInstance(XtextResourceSet.class);
resourceSet.addLoadOption(XtextResource.OPTION_RESOLVE_ALL, Boolean.TRUE);
URI uri = URI.createURI("../../../test-files/multi-resource/right.statemachine");
Resource r = resourceSet.createResource(uri);
uri = URI.createURI("../../../test-files/multi-resource/left.statemachine");
r = resourceSet.createResource(uri);
Is this the correct way of adding the resources to the resources set?
Also I am attaching the modified html file ace-statemachine-resource-multi.html
Could someone please guide me on this.
Thanks
Shiv
|
|
|
Powered by
FUDForum. Page generated in 0.10515 seconds