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
- 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: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Karsten Thoms Messages: 586 Registered: July 2009 Location: Dortmund, Germany
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.
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.