基於此simple tutorial,我試圖顯示彈出窗口通知,作爲org.eclipse.mylyn.commons.ui依賴項的一部分。所以我加入這個依賴於我的plugin.xml這樣:Eclipse插件開發:無法解決依賴關係
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.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)
...
您使用的是目標平臺嗎?你建立什麼平臺版本? – tkotisis
Eclipse Indigo。 – Zombies