Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » IMPORT issue
IMPORT issue [message #750674] Tue, 25 October 2011 21:52 Go to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
I would like to IMPORT either a relative or fully qualified file into the scope of my model, but by default it seems I need to prefix the URI with "file:/" and I would instead like to hide this from the user.

// this is how I currently need to create the IMPORT statement.

IMPORT 'file:/some_dir/nested/foo.lang';

// I would like to do the following:\
IMPORT '/some_dir/nested/foo.lang';
IMPORT '../../../some_other_dir/nested/bar.lang';

I am currently using the ImportUriGlobalScopeProvider as the injected IGlobalScopeProvider for the language , but I cannot figure out if this the correct place to override something. Lastly I am still using xtext 1.x.
Re: IMPORT issue [message #751643 is a reply to message #750674] Wed, 26 October 2011 05:44 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i guess a nice hook for this would be org.eclipse.xtext.scoping.impl.ImportUriResolver or as your said org.eclipse.xtext.scoping.impl.ImportUriGlobalScopeProvider.getImportedUris(EObject)

~Christian




Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:How to get all Xtext resources from a Context Menu?
Next Topic:MWE2 running as standalone with external workflow file
Goto Forum:
  


Current Time: Fri Apr 26 06:22:06 GMT 2024

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

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

Back to the top