Search code examples
javaeclipsedslxtext

Include runtime class with xtext eclipse gui


I'm creating a DSL using Xtext to generate java code. I want to be able to provide some 'runtime' classes that my generated java will utilise but I can't work out how to get them included into the eclipse ui when it runs (run as eclipse application from the ui project).

For example, say i have the following dsl code:

class X
class Y

Then I want to generate the following java:

import example.Base;
public class X extends Base {}
class Y extends Base{}

But when i run the eclipse application the example.Base class isn't included ... How do i get it included?


Solution

  • You have to do this yourself either by generating this class yourself or adding it to the class path of the project containing the model files