Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Visibility, scoping and imported namespace
Visibility, scoping and imported namespace [message #879591] Thu, 31 May 2012 09:40
Eclipse UserFriend
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: Fri Jul 04 10:55:55 EDT 2025

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

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

Back to the top