Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » resolve references between two files in webUI(Is it possible to create cross references between two resources in webUI?)
resolve references between two files in webUI [message #1805966] Mon, 29 April 2019 13:02 Go to next message
Peter Luthardt is currently offline Peter LuthardtFriend
Messages: 43
Registered: February 2014
Member
I am trying to build a web editor for an existing dsl. As a start I created a myDSL
grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.xbase.annotations.XbaseWithAnnotations

generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"

Model:
	'package' name=QualifiedName
	greetings+=Greeting*
;
	
Greeting:
	'Hello' type =JvmTypeReference name=ID '!'
	('greet ' greeted += [Greeting|QualifiedName] '!')*
;


I added the Save,Load and Generated buttons and added the FileResourceHandler.
Now I start ServerLauncher an I can open the editor in the browser.
Now I create two resources
Example1.mydsl
package test
Hello String A !

Hello String B !
greet A!

Example2.mydsl
package test1
Hello String B1 !
greet test.A!

error test.A cannot be resolved.

What do I have to do to include all resources found in one directory?
Is there any way to generate all resources (Like a clean build in eclipse)?

Thanks!
Re: resolve references between two files in webUI [message #1805967 is a reply to message #1805966] Mon, 29 April 2019 13:06 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
hi, i cannot follow you. there is no directory in xtext-web.
you have to care about population of resourcesets youself.
did you have a look at
orion-statemachine-resource-multi.html
in
https://github.com/eclipse/xtext-web/tree/master/org.eclipse.xtext.web.example.jetty


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: resolve references between two files in webUI [message #1805969 is a reply to message #1805967] Mon, 29 April 2019 13:39 Go to previous messageGo to next message
Peter Luthardt is currently offline Peter LuthardtFriend
Messages: 43
Registered: February 2014
Member
Thank you,
I had I did not. Bu now know I had a quick look. Am I right, that I have to load all the resources into the client to be able to reference them?
Re: resolve references between two files in webUI [message #1805975 is a reply to message #1805969] Mon, 29 April 2019 14:40 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
No into the resourceset in the backend

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:How to let Quick Outline differ from Outline?
Next Topic:YAML encoded DSL in xtext
Goto Forum:
  


Current Time: Fri Mar 29 08:10:34 GMT 2024

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

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

Back to the top