0

My plugin has some dependencies and it automatically install these dependencies (other third party plugins) when I install my plugin. When I uninstall my plugin, its dependencies are uninstalled as well.

As these other plugins may be useful to the user, is there any way to uninstall my plugin but leave these dependencies installed?

As far as I could investigate, if I install these other plugins before installing my plugin then they will remain there, but if I install them as dependencies they get ripped off.

Chris Gerken
  • 16,221
  • 6
  • 44
  • 59
Ecil
  • 1,009
  • 1
  • 13
  • 28

2 Answers2

1

I'd suggest you disable the plugin instead of uninstalling it, if possible. The answer swimmingfisher provides to Temporarily Disable Eclipse Plugin tells you how to do it.

Community
  • 1
  • 1
Chris Gerken
  • 16,221
  • 6
  • 44
  • 59
  • My current need is to uninstall and install again the plugin (in a test environment), without having to wait to install all dependencies again (which takes way more time). So in my case, disabling is not an option. Thanks anyway. – Ecil Sep 13 '12 at 00:10
  • In that case I can only recommend a dummy plugin with the same prereqs. Install the dummy plugin and the real plugin should uninstall leaving the prereqs because they're still needed by the dummy plugin. – Chris Gerken Sep 13 '12 at 01:27
1

If you installed the dependencies explicitly before installing your main plugin, then P2 treats them as installed by the user. In the dependency case, it treats them as installed by the system.

All plugins, which were installed by the system (not by the user), are automatically removed during an uninstallation, if there are no dependent plugins. At least that is what I remember from an EclipseCon presentation by the P2 guys.

That said, it is simply not your job to decide for the user. The user installes features. If those features are uninstalled, their plugins are gone. If the user still wants that functionality, he should install the features containing those plugins.

Bananeweizen
  • 21,797
  • 8
  • 68
  • 88
  • Thanks for your answer. I completely agree with you. I knew it would probably work that way, but unfortunately this is not documented anywhere. – Ecil Sep 14 '12 at 19:22