Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » ImportedNamespaceAwareLocalScopeProvider
ImportedNamespaceAwareLocalScopeProvider [message #642038] Mon, 29 November 2010 16:09 Go to next message
Mark Christiaens is currently offline Mark ChristiaensFriend
Messages: 63
Registered: October 2010
Member
I have some questions related to ImportedNamespaceAwareLocalScopeProvider:

  • Why is it called ...LocalScopeProvider while it is derived from AbstractGlobalScopeDelegatingScopeProvider?
  • Am I correct in thinking that it scans the current namespace for the "importedNamespace" attribute but only in objects that are direct children from the top object of the namespace?

[Updated on: Mon, 29 November 2010 16:10]

Report message to a moderator

Re: ImportedNamespaceAwareLocalScopeProvider [message #642085 is a reply to message #642038] Mon, 29 November 2010 18:37 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Mark,

it is called GlobalScopeDelegatingScopeProvider because it will delegate
to the GlobalScopeProvider eventually. On the other hand it is called
LocalScopeProvider because it uses only local information to create its
own scopes will their respective outer scopes are produced by the
GlobalScopeProvider.
You are right: the default implementation will only use
importedNamespaces from directly contained elements.
In other words: it will try to find these namespaces for every element
in the container hierarchy (every 'namespace'). If you want to resolve a
cross reference in SubChild, the implementation will look for
importedNamespaces in SubChilds contents, in Childs Contents and in
Roots contents.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 29.11.10 17:09, schrieb Mark Christiaens:
> I have some questions related to ImportedNamespaceAwareLocalScopeProvider:
>
> Why is it called ...LocalScopeProvider while it is derived from
> AbstractGlobalScopeDelegatingScopeProvider?
> Am I correct in thinking that it scans the current namespace for the
> "importedNamespace" attribute but only in objects that are direct
> children from the top object of the namespace?
>
>
Previous Topic:XText and TPTP
Next Topic:[Xtext] Serializing an expression DSL with parentheses and different operator priorities
Goto Forum:
  


Current Time: Thu Apr 25 08:05:03 GMT 2024

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

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

Back to the top