Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » [Xtext] import scoping
[Xtext] import scoping [message #51795] Tue, 16 June 2009 08:41
Derek Palma is currently offline Derek PalmaFriend
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
Previous Topic:[Xtext] AST processing during linking question
Next Topic:[xtext] problems with stdlib::io extension
Goto Forum:
  


Current Time: Thu Nov 21 15:56:08 GMT 2024

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

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

Back to the top