我开发了两个 Eclipse 插件,EAXMLModelExchange 和 EAXMLModelExchangeWizard。
我想在插件 EAXMLModelExchangeWizard 中调用一个公共静态方法 EAXMLExchange.convertEAModelToEAXml(String, String)。
该类位于包 eaxmlmodelexchange 中。
如何调用该方法。导入 eaxmlmodelexchange.EAXMLExchange;
当我将项目作为 Eclipse 应用程序运行时它可以工作,但是当我将它导出到 .jar 文件时,该方法不会被调用。
public void runFunction() {
EAXMLExchange.convertEAModelToEAXml(String, String);
}
EAXMLModelExchange 中的 MANIFEST.MF
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: EAXMLModelExchange
Bundle-SymbolicName: EAXMLModelExchange;singleton:=true
Bundle-Version: 1.0.0
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.sphinx.emf;bundle-version="0.7.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: eaxmlmodelexchange
EAXMLModelExchangeWizard 中的 MANIFEST.MF
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: EAXMLModelExchangeWizard
Bundle-SymbolicName: EAXMLModelExchangeWizard;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: eaxmlexchangewizard.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.ui.ide,
org.eclipse.sphinx.emf;bundle-version="0.7.0",
EAXMLModelExchange;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
有谁知道如何让它工作?