Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Visibility, scoping and imported namespace
Visibility, scoping and imported namespace [message #879591] Thu, 31 May 2012 13:40
Fabian G. is currently offline Fabian G.Friend
Messages: 48
Registered: May 2010
Location: Namur (Belgium)
Member
Hi All,

I'm trying to have nested visibility for my dsl model elements, as well as explicit imports of other models (when imported, referred by their simple names). I've explored this forum, the doc and the itemis blog, but couldn't achieve to have it right.

Here's a sample grammar (incomplete):

Model:
  'model' name=ID ';'
  imports+=Import*;

Import:
  'import' importedNamespace=[Model|FQNWithWildCard]';';

FWNWithWildCard:
  FQN(.*)?;

FQN:
  ID('.'ID)*;


I activated these fragments to have the qualified name mechanism working.
fragment = scoping.ImportNamespacesScopingFragment {}
fragment = exporting.QualifiedNamesFragment {}


The problem is that every model in the same project is visible in all models (I filtered them by using filteringscope, but I'm not really happy with it since they're flat representation, so it causes problems in some places). I tried to extends the ImportedNamespaceAwareLocalScopeProvider, but I could not avoid importing all models. Could someone point me to the right strategy?

Thanks,
Fabian
Previous Topic: Auto insert single proposals
Next Topic:Xtext: Xbase extensions
Goto Forum:
  


Current Time: Tue Dec 23 05:22:35 GMT 2014

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

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