gpt4 book ai didi

java - "Couldn' t 解析对语法 'org.eclipse.xtext.common.Terminals' 的引用“- PDE 已安装

转载 作者:行者123 更新时间:2023-12-01 08:50:48 27 4
gpt4 key购买 nike

我正在尝试在 xtext 中创建基本语法,例如下面的默认语法:

grammar x.Y with org.eclipse.xtext.common.Terminals

generate x "http://www.Y.x"

Model:
greetings+=Greeting*;

Greeting:
'Hello' name=ID '!';

但是,我收到错误:

Couldn't resolve reference to Grammar 'org.eclipse.xtext.common.Terminals'.

网上搜索了一下,建议是安装Eclipse Plug-in Development Tools (PDE)。我已经这样做了,但问题仍然存在(清理项目后)。

我还尝试了 RCP Eclipse Nero 软件包,问题仍然存在。

我已经安装了 Java SE 1.8,并且正在使用 Eclipse Nero(RCP 和非 RCP)。

我在网上找不到更多建议,唯一的建议似乎是确保安装 PDE。有什么想法吗?

更新

默认值是在项目设置中设置的。

项目结构截图:

enter image description here

明显的问题如下:

Description Resource Path Location Type Bundle 'org.eclipse.equinox.common' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl/META-INF line 10 Plug-in Problem Bundle 'org.eclipse.ui.editors' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.ui/META-INF line 13 Plug-in Problem Bundle 'org.eclipse.ui.ide' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.ui/META-INF line 14 Plug-in Problem Bundle 'org.eclipse.xtext.ide' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.ide/META-INF line 9 Plug-in Problem Bundle 'org.eclipse.xtext.junit4' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.ui.tests/META-INF line 12 Plug-in Problem Bundle 'org.eclipse.xtext.testing' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.tests/META-INF line 10 Plug-in Problem Bundle 'org.eclipse.xtext.testing' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.ui.tests/META-INF line 10 Plug-in Problem Bundle 'org.eclipse.xtext.ui.codetemplates.ui' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.ui/META-INF line 12 Plug-in Problem Bundle 'org.eclipse.xtext.ui.shared' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.ui/META-INF line 11 Plug-in Problem Bundle 'org.eclipse.xtext.ui' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.ui/META-INF line 10 Plug-in Problem Bundle 'org.eclipse.xtext.xbase.ide' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.ide/META-INF line 10 Plug-in Problem Bundle 'org.eclipse.xtext.xbase.junit' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.ui.tests/META-INF line 13 Plug-in Problem Bundle 'org.eclipse.xtext.xbase.testing' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.tests/META-INF line 11 Plug-in Problem Bundle 'org.eclipse.xtext.xbase.testing' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.ui.tests/META-INF line 11 Plug-in Problem Bundle 'org.eclipse.xtext.xbase' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl/META-INF line 9 Plug-in Problem Bundle 'org.eclipse.xtext' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl/META-INF line 8 Plug-in Problem Bundle 'org.junit' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.tests/META-INF line 9 Plug-in Problem Bundle 'org.junit' cannot be resolved MANIFEST.MF /org.xtext.example.mydsl.ui.tests/META-INF line 9 Plug-in Problem Bundle com.ibm.icu cannot be resolved build.properties /org.xtext.example.mydsl line 19 Plug-in Problem Bundle org.apache.commons.logging cannot be resolved build.properties /org.xtext.example.mydsl line 17 Plug-in Problem Bundle org.apache.log4j cannot be resolved build.properties /org.xtext.example.mydsl line 18 Plug-in Problem Bundle org.eclipse.emf.codegen.ecore cannot be resolved build.properties /org.xtext.example.mydsl line 12 Plug-in Problem Bundle org.eclipse.emf.mwe.utils cannot be resolved build.properties /org.xtext.example.mydsl line 13 Plug-in Problem Bundle org.eclipse.emf.mwe2.launch cannot be resolved build.properties /org.xtext.example.mydsl line 14 Plug-in Problem Bundle org.eclipse.emf.mwe2.lib cannot be resolved build.properties /org.xtext.example.mydsl line 15 Plug-in Problem Bundle org.eclipse.xtext.common.types cannot be resolved build.properties /org.xtext.example.mydsl line 10 Plug-in Problem Bundle org.eclipse.xtext.xbase cannot be resolved build.properties /org.xtext.example.mydsl line 9 Plug-in Problem Bundle org.eclipse.xtext.xtext.generator cannot be resolved build.properties /org.xtext.example.mydsl line 11 Plug-in Problem Bundle org.objectweb.asm cannot be resolved build.properties /org.xtext.example.mydsl line 16 Plug-in Problem Couldn't resolve reference to Grammar 'org.eclipse.xtext.common.Terminals'. MyDsl.xtext /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 1 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDsl.xtext Grammar Problem Couldn't resolve reference to JvmIdentifiableElement 'baseName'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 13 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'code'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 26 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'component'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 10 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'configuration'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 11 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'createEclipseMetaData'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 24 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'eclipsePlugin'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 18 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'eclipsePluginTest'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 21 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'enabled'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 16 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'enabled'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 19 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'enabled'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 22 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'encoding'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 27 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'fileExtensions'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 34 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'fileHeader'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 29 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'generateStub'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 37 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'language'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 32 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'lineDelimiter'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 28 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'name'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 33 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'project'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 12 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'rootPath'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 14 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'runtimeTest'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 15 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'serializer'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 36 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmIdentifiableElement 'validator'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 39 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmType 'StandardLanguage'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 32 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmType 'StandardProjectConfig'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 12 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmType 'Workflow'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 8 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem Couldn't resolve reference to JvmType 'XtextGenerator'. GenerateMyDsl.mwe2 /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 10 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/GenerateMyDsl.mwe2 MWE2 Problem ID cannot be resolved to a rule MyDsl.xtext /org.xtext.example.mydsl/src/org/xtext/example/mydsl line: 9 /org.xtext.example.mydsl/src/org/xtext/example/mydsl/MyDsl.xtext Grammar Problem No available bundle exports package 'org.apache.log4j' MANIFEST.MF /org.xtext.example.mydsl.ui/META-INF line 15 Plug-in Problem

最佳答案

确保您的目标平台没有损坏或丢失:窗口 -> 首选项 -> 搜索“目标平台”

关于java - "Couldn' t 解析对语法 'org.eclipse.xtext.common.Terminals' 的引用“- PDE 已安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42419747/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com