Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Prevent bundle from loading
Prevent bundle from loading [message #1391147] Mon, 30 June 2014 14:07 Go to next message
philipp huebner is currently offline philipp huebnerFriend
Messages: 65
Registered: July 2009
Member
Hello together,
it seems we have a little problem here. We want to integrate a licence mechanism in our rcp (eclipse 3.Cool based application. So i tried to through an exception in bundle - start.
It works, but it seems that the plugin still contributes to our ui, which seems to me as a dirty osgi implementation. Does anybody knows a way to get rid of this?
Re: Prevent bundle from loading [message #1396707 is a reply to message #1391147] Tue, 08 July 2014 17:13 Go to previous messageGo to next message
Eclipse UserFriend
The workbench shows contributions from both started and lazily-activated bundles. You could make your license-checked bundles be explicitly started, or use property-testers or activities (not fully supported in 4.x yet) to control their visibility.

Brian.
Re: Prevent bundle from loading [message #1398010 is a reply to message #1396707] Thu, 10 July 2014 13:33 Go to previous messageGo to next message
philipp huebner is currently offline philipp huebnerFriend
Messages: 65
Registered: July 2009
Member
Explicitly doing that means to load a plugin, but not showing any contributions depending on licence check via testers and so on - that's dirty and a lot of of effort now and in future Sad . I don't understand from my point of you why there are UI contributions for a not-started bundle. Seems for me that there goes something wrong or dirty in the RPC loading order.
Making it explicit seems to doesn't work either: There are classes loaded and called in our startup sequence, so the plugin is loaded without using the activator start method Sad.


Re: Prevent bundle from loading [message #1398017 is a reply to message #1398010] Thu, 10 July 2014 13:42 Go to previous messageGo to next message
Eclipse UserFriend
Philipp, there shouldn't be any contributions from an unstarted bundle (i.e., from bundles in the RESOLVED state). Contributions from started and lazily-activated bundles will be shown (in the ACTIVE or STARTING states), however. You can see the states from the OSGi console.

Brian.
Re: Prevent bundle from loading [message #1398035 is a reply to message #1398017] Thu, 10 July 2014 14:08 Go to previous messageGo to next message
philipp huebner is currently offline philipp huebnerFriend
Messages: 65
Registered: July 2009
Member
I have the following behaviour in 3.8:
When I set the activation policy to lazy, eclipse calls the start method - I through an exception - the plugin doesn't load, there are no classes but the plugin.xml UI contributions are still there, pointing to nothing. I don't know what internal state flag is set here, but I thought an exception in a method called start should prevent the plugin from starting.
Re: Prevent bundle from loading [message #1398114 is a reply to message #1398035] Thu, 10 July 2014 16:36 Go to previous message
Eclipse UserFriend
Throwing an exception prevents your bundle from being started, but its plugin.xml file is processed by the extension registry on start. It sounds like you want to make your bundle be manually activated (i.e., remove the Bundle-ActivationPolicy entirely).

Brian.
Previous Topic:Perspective UI Design best practices
Next Topic:Cannot write artifacts to a composite repository.
Goto Forum:
  


Current Time: Fri Mar 29 08:53:54 GMT 2024

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

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

Back to the top