Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Referencing other models in other files
Referencing other models in other files [message #636537] Mon, 01 November 2010 19:10 Go to next message
No real name is currently offline No real nameFriend
Messages: 101
Registered: August 2010
Senior Member
I want to add "include" like functionality to my DSL. I was looking at this post: http://www.eclipse.org/forums/index.php?t=msg&th=4844&am p;S=6cdc5e607adc3f033632273cd92d139e#msg_14610

Is this still relevant? Where is the URI token defined in Xtext 1.0.1? Thanks for any help.


Re: Referencing other models in other files [message #636548 is a reply to message #636537] Mon, 01 November 2010 20:14 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

yes it is still possible to use explicit imports

use something like
Import : 
  'import' importURI=STRING;


in the grammar

and modify the workflow like this
			// scoping and exporting API
			fragment = scoping.ImportURIScopingFragment {}
			fragment = exporting.SimpleNamesFragment {}

			// scoping and exporting API 
//			fragment = scoping.ImportNamespacesScopingFragment {}
//			fragment = exporting.QualifiedNamesFragment {}
//			fragment = builder.BuilderIntegrationFragment {}


Of course you can use the default behaviour too: it lets you reference stuff from other model files without any explicit imports at all.

~Christian



Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Mon, 01 November 2010 20:15]

Report message to a moderator

Previous Topic:Assign parts of input to string property
Next Topic:Problem Using Resource URIs to Import Existing EPackages
Goto Forum:
  


Current Time: Wed Apr 24 19:48:12 GMT 2024

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

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

Back to the top