Name validation for imported files [message #984611] |
Wed, 14 November 2012 16:09  |
Eclipse User |
|
|
|
I have a language where names imported from another file cannot be overwritten by newly defined variables. So if I have
file1.mydsl
a : int
b : int
file2.mydsl
import "file1.mydsl"
a : int
c : int
I want it to flag an error on the 'a' declared in file2.mydsl. I've tried following the solution presented in this post, but it is overinclusive. In particular, if I have an unrelated file3.mydsl which declares 'c' it will still give an error in file1.mydsl, even though file3.mydsl is never imported into that context. I am using the ImportUriGlobalScopeProvider, but IContainer.Manager.getVisibleContainers seems to have a different notion of visibility from the scope provider. Any ideas?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.25849 seconds