2013-05-08 81 views
0

我有在我的DSL配置作用域一些麻煩XTEXT:全球範圍和importedURI

在我mwe2我已經設置

// scoping and exporting API 
fragment = scoping.ImportURIScopingFragment {} 
fragment = exporting.SimpleNamesFragment {} 

該方式的內容輔助提供了所有可能的引用(那些包含在同一文件中以及包含在項目中不同文件中的文件中)。這意味着在沒有任何導入的情況下,我仍然可以在內容中看到對正確類型的元素的引用,但是將其定義爲不同的文件。 當我選擇這些引用之一時,編譯器將其描述爲「coulnd't resolve reference to ..」,儘管引用的元素被定義爲導入的文件。請注意,導入seembs是正確的,因爲我沒有看到任何「導入的資源找不到」。錯誤,我期望,因爲我也已配置

fragment = validation.JavaValidatorFragment { 
       composedCheck = "org.eclipse.xtext.validation.ImportUriValidator" 
       composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" 
      } 

我做錯了什麼?

回答

1

由於在這個崗位explaind http://www.eclipse.org/forums/index.php/t/486553/

你也有評論...

// provides the necessary bindings for java types integration 
// fragment = types.TypesGeneratorFragment {} 

// generates the required bindings only if the grammar inherits from Xbase 
// fragment = xbase.XbaseGeneratorFragment {} 

然後正常工作