基于这个简单的教程,我正在尝试显示弹出通知,作为 org.eclipse.mylyn.commons.ui 依赖项的一部分。因此,我已将此依赖项添加到我的 plugin.xml 中,如下所示:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Roll and Scroll Recorder
Bundle-SymbolicName: ATF_Recorder_Plugin;singleton:=true
Bundle-Version: 0.0.502
Bundle-Activator: com.jcraft.eclipse.jcterm.JCTermPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
com.jcraft.jsch;bundle-version="0.1.31",
org.eclipse.core.resources;bundle-version="3.7.101",
org.eclipse.jsch.core;bundle-version="1.1.300",
com.jcraft.eclipse.jsch.core,
org.eclipse.mylyn.commons.ui;bundle-version="3.6.1"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: OSEHRA
此外,我在我的 Feature 项目中单击了计算依赖项,现在将其更新到我的 feature.xml 文件中:
<requires>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="com.jcraft.jsch" version="0.1.31" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.resources" version="3.7.101" match="greaterOrEqual"/>
<import plugin="org.eclipse.jsch.core" version="1.1.300" match="greaterOrEqual"/>
<import plugin="com.jcraft.eclipse.jsch.core"/>
<import plugin="org.eclipse.mylyn.commons.ui" version="3.6.1" match="greaterOrEqual"/>
</requires>
但是,当我安装我的自定义插件并显示它的视图时,依赖项永远不会被解决:
java.lang.ClassNotFoundException: org.eclipse.mylyn.internal.provisional.commons.ui.AbstractNotificationPopup
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:626)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:562)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:486)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:459)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.jcraft.eclipse.jcterm.JCTermView.createPartControl(JCTermView.java:189)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2245)
...