|Problem with Linking to library models [message #1786193]
||Thu, 26 April 2018 16:47
| Neeraj Bhusare
Registered: July 2009
I am seeing some strange linking behavior in my project and I am seeking for some help/pointers.
To give some background, I have two DSL's - Function and Model, both having their respective JvmModelInferrer's. The Function DSL is based on Xbase. I have a library project that bundles an array of model DSL files that can be referenced in the Functions. The project also contains the generated Java (.class files) for the Models.
I have two projects (xtext nature), each containing a Function that has a cross-reference to the Model endorsed by the library project. Both projects declare a dependency on the library project.
In one project, when I navigate to the referenced Model, it links to the right Model DSL file and opens the same in the editor. Now, if I do the same in the second project, it links to the generated Java file (java:/Objects/com.myproject.XXModel) and opens it in the Java editor.
In the DSL, I customize the XImportSectionNamespaceScopeProvider (Function DSL) and ImportedNamespaceAwareLocalScopeProvider (Model DSL) to implicitly import the endorsed models. I have also customized the Scope providers.
While debugging, I noticed a difference in the created ResourceSets in the above two projects. In the first project, the resource set contains the Function and the endorsed Models. In the second, it doesn't contain the endorsed Models, which apparently is leading to the issue.
I'll continue investigating the issue. I am writing to check if someone has seen the similar behavior and has some clue/pointers.
PS - I cannot share the source code.
Thanks in advance.
Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
[Updated on: Thu, 26 April 2018 16:51]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01729 seconds