Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Cross linking multiple DSLs in Web Editor
Cross linking multiple DSLs in Web Editor [message #1732933] Mon, 23 May 2016 08:26
Shiv Kandikuppa is currently offline Shiv KandikuppaFriend
Messages: 10
Registered: May 2016
Junior Member
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
Previous Topic:Language default editor
Next Topic: xtext grammar ignore everything after a keyword
Goto Forum:
  


Current Time: Mon Nov 11 20:21:57 GMT 2019

Powered by FUDForum. Page generated in 0.01931 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top