简体   繁体   English

在xtext eclipse gui中包含运行时类

[英]Include runtime class with xtext eclipse gui

I'm creating a DSL using Xtext to generate java code. 我正在使用Xtext创建DSL来生成Java代码。 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). 我希望能够提供一些生成的Java将要使用的“运行时”类,但是我无法弄清楚如何在运行时将它们包括在Eclipse ui中(作为ui项目中的Eclipse应用程序运行)。

For example, say i have the following dsl code: 例如,说我有以下dsl代码:

class X
class Y

Then I want to generate the following java: 然后,我想生成以下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? 但是,当我运行eclipse应用程序时,example.Base类不包括在内。如何获取它?

您必须自己生成该类,或者将其添加到包含模型文件的项目的类路径中,自己来做

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM