【问题标题】:How Eclipse check available plugin in some environment?Eclipse 如何在某些环境中检查可用插件?
【发布时间】:2012-03-27 02:57:55
【问题描述】:

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

我可以使用新的 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>

【问题讨论】:

    标签: eclipse eclipse-plugin


    【解决方案1】:
    1. 您是否能够在您的开发环境中的新 Eclipse 实例中运行该插件?即按下运行按钮并在您的插件处于活动状态的情况下启动一个新的 Eclipse 应用程序。

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

    根据评论编辑:

    尝试从 XML 中删除操作系统特定的部分,即属性“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">
    

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

    【讨论】:

    • 谢谢弗雷德里克。我将您所说的添加到原始帖子中。我尝试在 features.xml 中安装没有“requires”部分的插件,但它没有帮助。 :(
    • @kizmo 编辑根据您的评论回答
    猜你喜欢
    • 2018-11-22
    • 1970-01-01
    • 1970-01-01
    • 2011-07-31
    • 2012-01-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多