当Xtext语法扩展其他Xtext语法时出现错误
我有两个Eclipse插件Xtext(2.11)项目(称为Project A和B)Project B语法文件依赖于Project A语法文件。当Xtext语法扩展其他Xtext语法时出现错误
我所面临的问题,在从摇篮生成罐(应用插件)当我从文件扩展B的语法甲
项目B:语法文件:当我用下面的行:
grammar B with A
它给我以下错误,whilge生成gradle这个构建目标:
815 [主要] ERROR mf.mwe2.launch.runtime.Mwe2Launcher - 运行的工作流程乙问题:问题解析的源代码g'file:/ C:/Users/cpra/workspaceDSLNew1__final/B.parent/B/../ B/src/com/apama/studio/query/ext/B.xtext': XtextLinkingDiagnostic:null:2 无法解析对语法'A'的引用。
我按照下面的步骤:
创建的Xtext项目A,编辑语法和生成的工件。
创建的Xtext项目B
新增项目A在MANIFEST.MF依赖项目B的
为延伸的另一语法文件编辑语法文件。
面对上述错误,请让我知道如果我错过了什么?
我可以看到与此相关的 https://github.com/plugbee/dslforge/issues/19一个错误,这是有效的Xtext 2.11 LSP生成也?
有不同的事情TODO
确保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 b.parent/build.gradle
repositories {
jcenter()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
// this line is new
mavenLocal()
}
从B加DEP到 b.parent/B /的build.gradle
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 /组织/ XTEXT /示例除去standalonesetup掷骰子/看MyDSL/GenerateMyDslB.mwe2
你如何更新到eclipse/gradle/maven(无论你使用的)依赖关系是什么样子的? –
你能分享一个完整的hello世界项目吗 –
我已经在https://github.com/chetanladdha/sample/添加了我的源代码 –