Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Howto get defining Bundle from an Addon in Fragment?
Howto get defining Bundle from an Addon in Fragment? [message #1011570] Tue, 19 February 2013 20:30 Go to next message
Alex Kipling is currently offline Alex KiplingFriend
Messages: 260
Registered: July 2012
Senior Member
I have a Fragment.
There is an Addon in it.
Further there is an Exension implemented in the same Bundle.

I would like to get the Exensions from the Addon.


There is a way to get the Extensions by Bundle:
        IContributor c = ContributorFactoryOSGi.createContributor(bundle);
        IExtensionPoint[] extp = Platform.getExtensionRegistry().getExtensionPoints(c);


Unfortunately, when I am trying to get the Bundle from the Addon - I am getting the Bundle, which the Addon is merged into (Addon is in a Fragment).

        Bundle b = FrameworkUtil.getBundle(this.getClass()); //parent Bundle


Is it possible to get the Bundle, in which I defined the Addon and my Extensions?
Re: Howto get defining Bundle from an Addon in Fragment? [message #1012644 is a reply to message #1011570] Fri, 22 February 2013 00:10 Go to previous messageGo to next message
Eclipse UserFriend
Does your addon have a contributionURI like bundleclass://X/y.z where X is the name of the bundle you want? Grab X, and look it up by name. Might not be an ideal solution though but worth trying.
Re: Howto get defining Bundle from an Addon in Fragment? [message #1012775 is a reply to message #1012644] Fri, 22 February 2013 07:59 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
When elements are merged from fragments on startup we set the
*contributorURI* so you can track where an element in the model came from!

Tom

Am 22.02.13 01:10, schrieb Sopot Cela:
> Does your addon have a contributionURI like bundleclass://X/y.z where X
> is the name of the bundle you want? Grab X, and look it up by name.
> Might not be an ideal solution though but worth trying.
Previous Topic:How to style MHandledItem
Next Topic:Perspective Minimize/Maximize problem
Goto Forum:
  


Current Time: Sat Apr 20 02:00:12 GMT 2024

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

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

Back to the top