Jvm Xtext和Xtend:文件夹内的接口

Jvm Xtext和Xtend:文件夹内的接口,jvm,xtext,xtend,Jvm,Xtext,Xtend,我看到这些类是在单独的文件夹/包中生成的。但是接口文件是在根文件夹中生成的,而不是在特定包中生成的 以下是JVM Inferrer的代码: def dispatch void infer(Repository repo, IJvmDeclaredTypeAcceptor acceptor, boolean isPrelinkingPhase) { acceptor.accept(repo.toInterf

我看到这些类是在单独的文件夹/包中生成的。但是接口文件是在根文件夹中生成的,而不是在特定包中生成的

以下是JVM Inferrer的代码:

   def dispatch void infer(Repository repo, 
                IJvmDeclaredTypeAcceptor acceptor, 
                boolean isPrelinkingPhase) {   
      acceptor.accept(repo.toInterface(repo.name, [])) [      
          documentation = repo.documentation
          annotations += annotationRef(REPOSITORY);
          superTypes += JPAREPOSITORY.typeRef(repo.type.cloneWithProxies,Long.typeRef); 
    ]
  }
模型如下:

import dsltest.models.Plant
import dsltest.models.Customer

package dsltest.repositories {

 repo PlantRepository : Plant {}
 repo CustomerRepository : Customer {}
}
以下是生成的文件:


如何在dsltest->respositories->CustomerRepository.java中生成接口

accept(entity.toInterface(entity.fullyQualifiedName,[]))[
...
]


toInterface(字符串、初始值设定项)。So类型不匹配:无法从QualifiedName转换为字符串。第二个问题是:边界不匹配:类型参数不是我以前尝试过的方法getContainerOfType(EOObject,Class)的有界类型参数的有效替代品。无法解决这个问题。有没有其他方法可以做到这一点?你能分享一个完整的语法和推理,我可以复制和粘贴它是非常长的。很难在这里分享。问题是,我无法将fullyQualifiedName as添加到interface()参数类型。它只接受字符串。有没有办法通过在JVM中更改包名来生成不同包中的类?
accept(entity.toInterface(EcoreUtil2.getContainerOfType(entity,  Package).name+"."+entity.name,[]))[
...
]