我有两个Eclipse插件Xtext(2.11)项目(称为项目A和B)项目B语法文件依赖于项目A语法文件。
当我从文件A扩展B的语法时,我遇到了从Gradle生成jar (应用程序插件)的问题
项目B:语法文件:当我使用以下行时:
grammar B with A在生成gradle构建目标时,它给出了下面的错误:
815主要错误mf.mwe2.launch.runtime.Mwe2Launcher -运行工作流B的问题:问题解析 XtextLinkingDiagnostic: null:2 无法解决对语法'A‘的引用。
我遵循以下步骤:
面对上面的错误,如果我错过了什么,请告诉我。
我可以看到一个与这个https://github.com/plugbee/dslforge/issues/19相关的bug,这对XText2.11LSP生成也有效吗?
发布于 2017-02-22 13:28:25
有不同的事情要做
确保MyDslA.xtext实际上是打包的https://github.com/eclipse/xtext-core/issues/284 a.parent/gradle/源-layout.gradle
sourceSets.all {
//resources.exclude '**/*.g', '**/*.xtext', '**/*.mwe2', '**/*.xtend', '**/*._trace'
// remove xtext from the exclusion
resources.exclude '**/*.g', '**/*.mwe2', '**/*.xtend', '**/*._trace'
}将mavenLocal添加到b.parent/build.gradle
repositories {
jcenter()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
// this line is new
mavenLocal()
}将从b到b/b/build.gradle的dep添加到b。
dependencies {
compile "org.eclipse.xtext:org.eclipse.xtext:${xtextVersion}"
compile "org.eclipse.xtext:org.eclipse.xtext.xbase:${xtextVersion}"
// this line is new
compile "a:a:1.0.0-SNAPSHOT"
}从b.parent/b/src/org/xtext/example/mydsl/GenerateMyDslB.mwe2中删除标准设置垃圾
https://stackoverflow.com/questions/42389922
复制相似问题