Cross referencing dsl elements in xtext from a jar
I have a DSL written in xtext. Lets say the extension is dmodel. I have created a project with two files a.dmodel
and b.model
based on the DSL and various elements inside them are able to cro开发者_StackOverflow社区ss reference each other in the editor.
Lets say, I would like to move a.dmodel
to a jar and add it to a jar (and possibly add the jar to the project) and still be able to cross reference the elements from b.dmodel. How do I achieve that?
It works out of the box. You simply put the jar with the a.dmodel on the classpath of a java projects that contains the b.dmodel. Xtext will pick up that information and make the elements in a.dmodel referable.
精彩评论