Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » ImportURI is depricated?
ImportURI is depricated? [message #1782051] Fri, 16 February 2018 13:37 Go to next message
Timur Musaev is currently offline Timur MusaevFriend
Messages: 1
Registered: February 2018
Junior Member
Hello Everyone. I am new in Xtext and i have a question regarding ImroptURI attribute. Is it still valid to use? Or there are other alternatives for it? Because in current Xtext documentation it`s not mentioned at all.
Thanks in advance
Re: ImportURI is depricated? [message #1782236 is a reply to message #1782051] Tue, 20 February 2018 19:23 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12233
Registered: July 2009
Senior Member

its not deprecated but kind of discouraged. see

alternatives is
- use it anyway
- use name based scoping
- mimic uri based scoping with names (depends on how your uris work and how and if you work with different folders, relative vs absolute uris etc.

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Re: ImportURI is depricated? [message #1782242 is a reply to message #1782051] Tue, 20 February 2018 19:58 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 612
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Depends on your language. If you *have* to design with a strong include mechanism, then importURI is still a useful choice. If you design a new language consider a namespace based language better. Strongly discouraged are transitive imports.
Re: ImportURI is depricated? [message #1782280 is a reply to message #1782242] Wed, 21 February 2018 09:10 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6037
Registered: July 2009
Senior Member

Sorry. I'm old fashioned. I think a strong include is a very desirable property. Your code actually then does something vaguely understandable. Without it, all references require an expensively recomputed magic global index of everything that might possibly be useful to come up with a possibly surprising solution, particularly when you have too many debug test programs with similar declarations. MWE2 is an excellent example whereby invocation of an explicit MWE2 script loaded it to discover its name, then searched an index to execute a potentially different script with the 'same' name.


Ed Willink
Previous Topic:Cross referencing in xtext
Next Topic:Allow negative unary expression in combination with subtraction
Goto Forum:

Current Time: Fri Sep 21 02:07:58 GMT 2018

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

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

Back to the top