Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Referencing other models in other files
Referencing other models in other files [message #636537] Mon, 01 November 2010 15:10 Go to next message
Eclipse UserFriend
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 16:14 Go to previous message
Eclipse UserFriend
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

[Updated on: Mon, 01 November 2010 16:15] by Moderator

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


Current Time: Thu Jul 03 13:08:23 EDT 2025

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

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

Back to the top