|Re: Prevent Bundle from being loaded [message #894338 is a reply to message #894056]
||Sun, 08 July 2012 13:31
|| Libor Jelinek
Registered: January 2012
Location: Prague, Czech Rep.
one method to consider may be something like this:
1. Create IStartup class that will be checking licence (or whatever
appropriate) and bind it using org.eclipse.ui.startup extension point
(1). Plug-in referred in this extension point will be started when
2. If license check failed in early startup plug-in, uninstall bundle
programmatically with Bundle.uninstall() method (2). List of installed
bundles can be achieved from BundleContext.getBundles() method.
3. As Gunnar said, uninstalled bundles, not surprisingly, do not
contribute to UI anymore.
On 07/06/2012 03:56 PM, Missing name Mising name wrote:
> I have a Plug-In which makes contributions to the Eclipse UI
> (Views/Perspectives) via Extensions (plugin.xml). Depending on a license
> check I want the views not to be visible at all.
> My idea was to prevent the bundle from being loaded or stop/uninstall it
> after the license check was negative. Unfortunately all my attempts
> failed (the views are visible but their classes can not be loaded, so
> they only show exceptions).
> Do you have any ideas how to do this?
> Thanks in advance!
Powered by FUDForum
. Page generated in 0.02013 seconds