[Xtext] import scoping [message #51795] |
Tue, 16 June 2009 08:41 |
Derek Palma Messages: 141 Registered: July 2009 |
Senior Member |
|
|
Hi,
I am trying to determine the easiest way to control import scope. I have
been using the default scoping for entities at the file level (like classes)
so I have not taken over the this processing since it works well. My DSL
allows qualifying class references with the containing file's namespace. It
looks like AbstractDeclarativeScopingProvider ends up creating a
LazyReferenceResourceScope with the appropriate entities for the imported
file. It seems if I do this in the scoping provider I will need to duplicate
much of this functionality just adding the filtering by the imported
namespace. This is fine, but I was just wondering if there was a simpler way
so I don't have to take over all the class resolution.
For my DSL I have a syntax like <File>::<Class>. I just need to return the
classes in the imported module so the classes filtered against the
appropriate import name space. Name spaces can be hierachical (imagine one
imported file importing others and DefaultScope.createParent handles this).
Thanks in advance!
Derek
|
|
|
Powered by
FUDForum. Page generated in 0.06089 seconds