Search code examples
eclipse-pluginsmartyeclipse-pdteclipse-pde

Installation of one plugin depends on installation of other plugin


I have a custom plugin which has a nature of PHP. Now i dont want to make the developer install PDT and smarty PDT seperately. So i am including both the plugins along with my plugin for installation. I have created the plugin, the only problem i am facing during installation is smarty PDT needs Eclipse PDT installed beforehand. But as i want all the 3 plugins to be installed at one go , this is not happening.

The screen at installation

The code for site.xml(The update site which contains These 3 features, one of the feature consists of my plugin too) is as follows:

 <?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>

So how should i go about with this. If there is need of any code do ask me


Solution

  • You should create feature with dependency into another feature/plugins, example from 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>