Visibility, scoping and imported namespace [message #879591] |
Thu, 31 May 2012 09:40 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04875 seconds