一个插件的安装依赖于其他插件的安装

Installation of one plugin depends on installation of other plugin

我有一个自定义插件,其性质为 PHP。现在我不想让开发人员分别安装 PDT 和 smarty PDT。所以我包括了这两个插件以及我的安装插件。我已经创建了插件,我在安装过程中遇到的唯一问题是 smarty PDT 需要预先安装 Eclipse PDT。但是因为我希望一次安装所有 3 个插件,所以这没有发生。

site.xml(包含这3个功能的更新站点,其中一个功能也包含我的插件)的代码如下:

 <?xml version="1.0" encoding="UTF-8"?>
<site>
   <feature url="features/RudraX_1.0.0.201505071712.jar" id="RudraX" version="1.0.0.201505071712">
      <category name="Rudrax"/>
   </feature>
   <feature url="features/org.eclipse.php_3.2.0.201306051924.jar" id="org.eclipse.php" version="3.2.0.201306051924">
      <category name="Rudrax"/>
   </feature>
   <feature url="features/org.eclipse.php.smarty_feature_0.91.0.jar" id="org.eclipse.php.smarty_feature" version="0.91">
      <category name="Rudrax"/>
   </feature>
   <category-def name="Rudrax" label="Rudrax"/>
</site>

那我该怎么办呢。如果需要任何代码,请问我

您应该创建与另一个 feature/plugins 相关的特征,示例来自 Symfony Eclipse Plugin feature.xml:

<requires>
  <import feature="org.eclipse.php" version="3.4.0" match="greaterOrEqual"/>
  <import feature="com.dubture.composer.feature" version="1.0.2" match="greaterOrEqual"/>
  <import feature="com.dubture.twig.feature" version="1.0.11" match="greaterOrEqual"/>
  <import feature="org.eclipse.platform" version="4.2.0" match="greaterOrEqual"/>
  <import feature="com.dubture.doctrine.feature" version="1.0.8" match="greaterOrEqual" />
</requires>