Skip to main content



      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 09:02 Go to next message
Eclipse UserFriend
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 09:06 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: resolve references between two files in webUI [message #1805969 is a reply to message #1805967] Mon, 29 April 2019 09:39 Go to previous messageGo to next message
Eclipse UserFriend
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 10:40 Go to previous message
Eclipse UserFriend
No into the resourceset in the backend
Previous Topic:How to let Quick Outline differ from Outline?
Next Topic:YAML encoded DSL in xtext
Goto Forum:
  


Current Time: Sat Jul 05 11:57:02 EDT 2025

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

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

Back to the top