Eclipse plugin 为什么在构建eclipse插件时找不到所需捆绑包中的类
我正在使用Xtext,并且有几个插件 一个叫做harpo.plugin。在它的Manifest.MF文件中Eclipse plugin 为什么在构建eclipse插件时找不到所需捆绑包中的类,eclipse-plugin,xtext,Eclipse Plugin,Xtext,我正在使用Xtext,并且有几个插件 一个叫做harpo.plugin。在它的Manifest.MF文件中 Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: Plugin Bundle-SymbolicName: harpo.plugin;singleton:=true Bundle-Version: 1.0.0.qualifier Export-Package: harpo.plugin;uses:="org.eclips
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Plugin
Bundle-SymbolicName: harpo.plugin;singleton:=true
Bundle-Version: 1.0.0.qualifier
Export-Package: harpo.plugin;uses:="org.eclipse.xtext,org.eclipse.xtext.common.types,com.google.inject",
harpo.plugin.editor;uses:="org.eclipse.emf.ecore,org.eclipse.emf.common.util",
[... much omitted ... ]
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Import-Package: org.apache.log4j,
org.eclipse.jface.viewers,
org.eclipse.ui
Bundle-ActivationPolicy: lazy
现在,第二个名为harpo.plugin.ui的插件依赖于harpo.plugin。其Manifest.MF如下所示
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Ui
Bundle-SymbolicName: harpo.plugin.ui;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: harpo.plugin.ui.internal.EditorActivator
Export-Package: harpo.plugin.ui,
harpo.plugin.ui.contentassist,
harpo.plugin.ui.contentassist.antlr,
harpo.plugin.ui.internal,
harpo.plugin.ui.quickfix
Require-Bundle: harpo.plugin;bundle-version="1.0.0",
[...much omitted...]
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Import-Package: org.apache.log4j
Bundle-ActivationPolicy: lazy
现在,当我编译后一个插件时,所有依赖于harpo.plugin.editor中定义的类的java文件都有错误Type无法解析。
我的问题是:什么会导致这些错误
如果我将harpo.plugin项目添加到harpo.plugin.ui项目的“构建路径”中,则所有编译都将完成。但我不应该这么做,对吗?事实上,我可能不应该这样做,对吗?Java构建路径的库部分应该有一个“插件依赖项”部分。这应该是自动添加的(来自
.classpath
文件中的org.eclipse.pde.core.requiredPlugins
条目)。谢谢。在harpo.plugin.ui
的Java构建路径中有一个“插件依赖项”部分,但是harpo.plugin
不在列表中。因此,我使用了神奇的命令“plugintools>>updateclasspath…”,选择了缺少的项目,单击“Finish”,但该项目仍然不在类路径中。我试着删除“插件依赖项”部分。这似乎奏效了——也就是说,它真的消失了。然后用“插件工具>>更新类路径”重新构建了它。。。“.还是没有快乐!关闭Eclipse。重新启动Eclipse。问题解决了!Java构建路径的库部分应该有一个“插件依赖项”部分。这应该是自动添加的(来自.classpath
文件中的org.eclipse.pde.core.requiredPlugins
条目)。谢谢。在harpo.plugin.ui
的Java构建路径中有一个“插件依赖项”部分,但是harpo.plugin
不在列表中。因此,我使用了神奇的命令“plugintools>>updateclasspath…”,选择了缺少的项目,单击“Finish”,但该项目仍然不在类路径中。我试着删除“插件依赖项”部分。这似乎奏效了——也就是说,它真的消失了。然后用“插件工具>>更新类路径”重新构建了它。。。“.还是没有快乐!关闭Eclipse。重新启动Eclipse。问题解决了!Java构建路径的库部分应该有一个“插件依赖项”部分。这应该是自动添加的(来自.classpath
文件中的org.eclipse.pde.core.requiredPlugins
条目)。谢谢。在harpo.plugin.ui
的Java构建路径中有一个“插件依赖项”部分,但是harpo.plugin
不在列表中。因此,我使用了神奇的命令“plugintools>>updateclasspath…”,选择了缺少的项目,单击“Finish”,但该项目仍然不在类路径中。我尝试删除“插件依赖项”部分。这似乎有效——也就是说,它真的消失了。然后用“插件工具>>更新类路径…”重新构建它。仍然没有乐趣!关闭Eclipse。重新启动Eclipse。问题消失了!