Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » getting BundleContext in a view
getting BundleContext in a view [message #444275] Mon, 13 February 2006 12:39 Go to next message
Eclipse UserFriend
Originally posted by: faro12.gmx.net

Hi all,
can anybody tell me how to access the BundeContext of an rcp-app in a View?
I need to show the user all installed plugins...

greetings peter
Re: getting BundleContext in a view [message #444284 is a reply to message #444275] Mon, 13 February 2006 13:30 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Save your bundle context in your plugin activator. Then you can use
MyPlugin.getDefault().getBundleTypeInformation() ... etc.

Later,
PW


Re: getting BundleContext in a view [message #444290 is a reply to message #444284] Mon, 13 February 2006 13:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: faro12.gmx.net

hi,
how to save?
just as a variable in the class?
Re: getting BundleContext in a view [message #444296 is a reply to message #444290] Mon, 13 February 2006 16:25 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Yup, that's what I would do.

Then you can retrieve it from MyPlugin.getDefault().getSomething() ...
or have your plugin do the work and return the results you need:

MyPlugin.getDefault().getInstalledPlugins() ... returns String[]

Then your view doesn't have to know about BundleContexts and stuff.

Later,
PW


Re: getting BundleContext in a view [message #444321 is a reply to message #444296] Mon, 13 February 2006 17:57 Go to previous messageGo to next message
Stepan Rutz is currently offline Stepan RutzFriend
Messages: 52
Registered: July 2009
Member
Hi,

the standard About Dialog display a nice list of installed plugins and its
sourcecode org.eclipse.ui.internal.dialogs.AboutDialog is a nice example
on how to assemble that information.

You can add the standard about dialog to any MenuManager by doing
menuManager.add(ActionFactory.ABOUT.create(window)); for example from an
RCP application's ActionBarAdvisor.

Regards from Cologne,
Stepan Rutz
Re: getting BundleContext in a view [message #444322 is a reply to message #444321] Mon, 13 February 2006 18:00 Go to previous message
Stepan Rutz is currently offline Stepan RutzFriend
Messages: 52
Registered: July 2009
Member
Sorry forgot this one, also the plugins-view is nice and does provide more
than just a view of the installed plugins ...It is available at Show View
-> Others -> PDE -> Plugins with the sourcecode being at
org.eclipse.pde.internal.ui.view.PluginsView

It requires the pde.ui plugin plus what some dependencies of that one
though.

Regards, Stepan


Stepan Rutz wrote:

> Hi,

> the standard About Dialog display a nice list of installed plugins and its
> sourcecode org.eclipse.ui.internal.dialogs.AboutDialog is a nice example
> on how to assemble that information.

> You can add the standard about dialog to any MenuManager by doing
> menuManager.add(ActionFactory.ABOUT.create(window)); for example from an
> RCP application's ActionBarAdvisor.

> Regards from Cologne,
> Stepan Rutz
Previous Topic:Complete Skeleton for Newbie
Next Topic:Export for several platforms
Goto Forum:
  


Current Time: Thu Dec 26 11:41:05 GMT 2024

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

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

Back to the top