Eclipse如何在某些环境中检查可用的插件?

时间:2012-03-27 02:57:56

标签: eclipse eclipse-plugin

我在Indigo上制作了一些Eclipse插件和更新站点(Eclipse v3.7)。

我可以使用新的Eclipse实例调试我的插件,但我无法通过更新站点安装我的插件。

当我尝试使用Indigo测试安装我的插件时(与开发环境相同的环境),安装向导说:

Cannot complete the install because some dependencies are not satisfiable
com.mytest.helloworld.feature.group [1.0.0.201203071543] cannot be installed in this environment because its filter is not applicable.

(我尝试使用相同版本的eclipse安装我的插件 - Indigo。 并且,我的插件在手动安装后工作正常。)

是否有任何检查点可以解决这个问题?

eclipse如何检查可用的插件? (根据什么信息?)

这是我的features.xml。

<?xml version="1.0" encoding="UTF-8"?>
<feature
  id="com.mytest.helloworld"
  label="mytest Feature"
  version="1.0.0.qualifier"
  provider-name="mytest.com"
  plugin="com.mytest.helloworld"
  os="aix,hpux,linux,macosx,qnx,solaris,win32"
  ws="carbon,cocoa,gtk,motif,photon,win32,wpf"
  nl="en,ko"
  arch="ia64,ia64_32,PA_RISC,ppc,sparc,x86,x86_64">
   <description url="http://www.example.com/description">
      [Enter Feature Description here.]
   </description>

   <copyright url="http://www.example.com/copyright">
      [Enter Copyright Description here.]
   </copyright>

   <license url="http://www.example.com/license">
      [Enter License Description here.]
   </license>

   <url>
      <update label="mytest update" url="http://localhost:8088/plugin"/>
   </url>

   <requires>
      <import plugin="org.eclipse.ui"/>
      <import plugin="org.eclipse.core.runtime"/>
      <import plugin="org.eclipse.core.expressions" version="3.4.101"     match="greaterOrEqual"/>
      <import plugin="com.android.ide.eclipse.adt" version="0.9.5" match="greaterOrEqual"/>
      <import plugin="org.jdom" version="1.1.1" match="greaterOrEqual"/>
      <import plugin="org.apache.commons.httpclient" version="3.1.0" match="greaterOrEqual"/>
      <import plugin="org.eclipse.jdt.core" version="3.5.2" match="greaterOrEqual"/>
      <import plugin="org.eclipse.core.resources" version="3.5.2"     match="greaterOrEqual"/>
   </requires>

   <plugin
         id="com.mytest.helloworld"
         os="aix,hpux,linux,macosx,qnx,solaris,win32"
         ws="carbon,cocoa,gtk,motif,photon,win32,wpf"
         nl="en,ko"
         arch="ia64,ia64_32,PA_RISC,ppc,sparc,x86,x86_64"
         download-size="1000"
         install-size="1000"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="com.mytest.helloworld.nl1"
         os="aix,hpux,linux,macosx,qnx,solaris,win32"
         ws="carbon,cocoa,gtk,motif,photon,win32,wpf"
         nl="en,ko"
         arch="ia64,ia64_32,PA_RISC,ppc,sparc,x86,x86_64"
         download-size="1"
         install-size="1"
         version="0.0.0"
         fragment="true"
         unpack="false"/>
</feature>

1 个答案:

答案 0 :(得分:0)

  1. 您是否能够在开发环境中的新Eclipse实例中运行插件?即按下运行按钮并在插件处于活动状态时启动一个新的Eclipse应用程序。

  2. 似乎过滤器存在一些问题,要么您已经定义了不起作用的版本要求,要么定义了无法运行的操作系统。发布feature.xml可能会有所帮助。

  3. 根据评论进行编辑:

    尝试从XML中删除OS特定部分,即属性“os”,“ws”,“arch”以及可能“nl”。

    你会得到

    <feature
      id="com.mytest.helloworld"
      label="mytest Feature"
      version="1.0.0.qualifier"
      provider-name="mytest.com"
      plugin="com.mytest.helloworld">
    

    如果您以某种方式限制选择,则只需要输入这些属性,也就是说,您的插件包含仅适用于某些操作系统/体系结构的操作系统特定代码。