为什么在构建eclipse插件时找不到所需包中的类

时间:2015-06-01 17:37:59

标签: 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.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 can not be resolved.

我的问题:什么可能导致这些错误?

如果我将harpo.plugin项目添加到harpo.plugin.ui项目的“构建路径”中,则所有编译。但我不应该这样做,对吧?事实上我可能不应该这样做,对吗?

0 个答案:

没有答案