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 09:40
Fabian G. is currently offline Fabian G.
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: Thu Jul 31 21:44:06 EDT 2014

Powered by FUDForum. Page generated in 0.08169 seconds