Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » Controlling the installation of plugins using HookConfigurator(Controlling the installation of plugins using HookConfigurator)
Controlling the installation of plugins using HookConfigurator [message #1789962] Fri, 01 June 2018 09:04 Go to next message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 80
Registered: July 2009
Member
Hello,

I want to uninstall some of the plugins using HookConfigurator.
I found some examples based on BundleWatcher, but with latest org.eclipse.osgi bundle "BundleWatcher" is not available.

Can you please suggest how can control the plugin installation based user rights/license.

Advance thanks.

Regards,
Raghava Rao
Re: Controlling the installation of plugins using HookConfigurator [message #1790534 is a reply to message #1789962] Tue, 12 June 2018 13:09 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 490
Registered: July 2009
Senior Member
I'm unclear on the scenario and why it would require a HookConfigurator to uninstall bundles. Why not just use the OSGi Bundle API to uninstall bundles?
Re: Controlling the installation of plugins using HookConfigurator [message #1790810 is a reply to message #1790534] Mon, 18 June 2018 09:57 Go to previous messageGo to next message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 80
Registered: July 2009
Member
Hello Thomas,

Thanks for your reply.

We'll be using OSGI API to uninstall, but i want to uninstall before starting the workbench to avoid UI element creation.

With Previous Eclipse version API , i am able to do with BundleWatcher, Is there any way we can achieve the same?

Raghava Rao
Re: Controlling the installation of plugins using HookConfigurator [message #1790815 is a reply to message #1790810] Mon, 18 June 2018 13:12 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 490
Registered: July 2009
Senior Member
I suggest using a org.osgi.framework.SynchronousBundleListener which you can add during the start of the BundleActivator returned by your Equinox extension hook org.eclipse.osgi.internal.hookregistry.ActivatorHookFactory implementation. Another option is to use an ExtensionBundle-Activator header (see org.osgi.framework.Constants.EXTENSION_BUNDLE_ACTIVATOR) to define you system.bundle fragment's activator.

Ether way allows you to add your listener very early so you can see all bundle events.
Re: Controlling the installation of plugins using HookConfigurator [message #1790945 is a reply to message #1790815] Wed, 20 June 2018 12:51 Go to previous messageGo to next message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 80
Registered: July 2009
Member
Hello Thomas,

Thanks for the reply.

I tried with SynchronousBundleListener , i am able to get the bundle events for the first launch.

but if i try to relaunch application for second time , listener is not called.but if i launch with -clean option , listener gets called.

is there way to initiate the listener without "-clean" option?
I tried the same with "ResolverHookFactory". i am facing similar issue, only in first launch this is called, on second launch onwards this was not called.
only in -clean option it is getting called.

can you please suggest on this

Thanks,
Raghava Rao.
Re: Controlling the installation of plugins using HookConfigurator [message #1791237 is a reply to message #1790945] Tue, 26 June 2018 13:41 Go to previous messageGo to next message
Thomas Watson is currently offline Thomas WatsonFriend
Messages: 490
Registered: July 2009
Senior Member
It seems you would have similar issues with the old BundleWatcher. You should be looking at the existing bundles installed and acting upon them as appropriate. When starting from a cached state the bundles are not installed again, instead they are loaded from the persistent storage of the framework.
Re: Controlling the installation of plugins using HookConfigurator [message #1791260 is a reply to message #1791237] Wed, 27 June 2018 04:03 Go to previous message
Raghava Rao is currently offline Raghava RaoFriend
Messages: 80
Registered: July 2009
Member
Hello Thomas,

Thanks for your support.

I could able to solve this issue by setting "osgi.clean" to true in addHooks method based on some property value, i maintained that property in .settings/org.eclipse.ui.ide.prefs.

Regards,
Raghava Rao
Previous Topic:Problem with Secure Storage
Next Topic:What happen with the comp and ls commands ?
Goto Forum:
  


Current Time: Sat Nov 17 03:36:42 GMT 2018

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

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

Back to the top