Abhishek Choudhary
Abhishek Choudhary

Reputation: 8395

How to uninstall an eclipse plug-in through code

I want to uninstall eclipse plug-in through code. I don't want to use the eclipse provided option. I want to code the logic behind it in Java. I wrote the code to delete the required plug-in from plug-in dir and feature as well but still the name of the plug-in is getting displayed in Eclipse Uninstall option.

Upvotes: 2

Views: 218

Answers (2)

Prakash G. R.
Prakash G. R.

Reputation: 4892

You need org.eclipse.equinox.p2.operations.UninstallOperation

Upvotes: 2

VonC
VonC

Reputation: 1328522

I am not sure about the exact mechanism, but this (2009) code about uninstalling an MTJ module.
(See Difference between eclipse pulsar, mtj, me).

Even if it involves some GUI (Uninstall Wizards), it is calling some p2 code (like a p2 PlannerResolutionOperation), which can give some clue as to how remove a module through p2 in Java code.

Upvotes: 0

Related Questions