Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Uninstall an eclipse plugin programmatically
Uninstall an eclipse plugin programmatically [message #1738445] Tue, 19 July 2016 23:12 Go to next message
neto Mising name is currently offline neto Mising nameFriend
Messages: 33
Registered: July 2009
I'm developing an eclipse plugin that when the user clicks a button, another plugin is uninstalled programmatically.

I tried:
Bundle b1 = Platform.getBundle(bundleId);

The plugin stops to work. However, the graphical elements are not deleted.

Then I tried:

I could find the corresponding IInstallableUnit

Then I use the following code:
private void scheduleUninstallOperationJob(
	        Collection<? extends IVersionedId> toUninstall) 
	    OperationFactory oFactory = new OperationFactory();
	    Collection<URI> repos = null;
	    UninstallOperation op = null;
	    try {
	        op = oFactory.createUninstallOperation(toUninstall, repos, null);
	    } catch (ProvisionException e) {
	    IStatus result = op.resolveModal(null);
	    if (result.isOK()) {

In this case, both plugin and UI are not deleted.

Finally, somebody can help me and say how to uninstall or even disable an eclipse plugin programmatically from another plugin.

Thanks in advance.
Re: Uninstall an eclipse plugin programmatically [message #1738509 is a reply to message #1738445] Wed, 20 July 2016 13:09 Go to previous message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 502
Registered: July 2009
Senior Member
Uninstalling a bundle should be all that is needed. If the bundle exports packages then you likely will want to perform a refreshBundles opertation [1]. But it sounds like the e4 UI layer is not recognizing that the bundle with the UI elements is going away. I would ask this on the eclipse e4 forum.

Previous Topic:Missing code signer information for third party JAR
Next Topic:HttpSessionAdapter
Goto Forum:

Current Time: Sun Sep 25 00:11:19 GMT 2022

Powered by FUDForum. Page generated in 0.02310 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top