Problem:
I would like to have a xtext DSL where I can cross link to java types included in a JAR.
Example:
Let’s suppose we have a simple DSL like:
Object:
'object' name=ID '{'
property=Property
'}';
Property:
'property' name=ID '{'
object=ObjectOrInclude
'}';
ObjectOrInclude:
Include | Object;
Include:
'include' include=[Object|ID];
In addition, there is a JAR in our classpath providing several classes that implement the interface
public interface IObject{
…
}
The cross link include should than allow us to refer to the EObjects coming from my DSLSs but also to the classes supplied by the JAR. I assume that I must integrate my Java Interface somehow into the xtext index and provide an ID and ResourceDescription for every class, so that the linker can resolve the classes. Yet, I have no idea how to implement this extension of the index.
Question:
How do I get my Java classes into the xtext index so that cross linking works?