permaculture playing cards*
The moose likes Swing / AWT / SWT and the fly likes SWT/Eclipse: Getting Installed Plugins from Eclipse Manage Configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "SWT/Eclipse: Getting Installed Plugins from Eclipse Manage Configuration" Watch "SWT/Eclipse: Getting Installed Plugins from Eclipse Manage Configuration" New topic
Author

SWT/Eclipse: Getting Installed Plugins from Eclipse Manage Configuration

Ryan Mosely
Greenhorn

Joined: Jan 22, 2010
Posts: 3
I need to pull back the list of files from - Help > Software Updates > Manage Configuration.

Right now I am using



to get all the bundles installed, but what I need is just to pull the top hierarchy and not all the fragments, etc. Because it is pulling back 600+ items. (this is actually for lotus notes but it is built on the eclipse platform) Any ideas?
Oleg Tikhonov
Ranch Hand

Joined: Aug 02, 2008
Posts: 55
Hi,
OSGi (Eclipse Equinox), type 'ss' command that stands for 'short status' and it lists all the bundles installed in the OSGi container.
Or you can start your application based on Eclipse by >your_program.exe -console.

Hope it helps,
Oleg.
Ryan Mosely
Greenhorn

Joined: Jan 22, 2010
Posts: 3
Oleg Tikhonov wrote:Hi,
OSGi (Eclipse Equinox), type 'ss' command that stands for 'short status' and it lists all the bundles installed in the OSGi container.
Or you can start your application based on Eclipse by >your_program.exe -console.

Hope it helps,
Oleg.


Hi, thanks for your reply. I don't exactly understand you, but I don't know if I can rely on another program to pull back this information. I was hoping there was an API to do so. Is there anyway I could perhaps implement this short status command into the BundleContext api for eclipse or pull back any data from this which shows which group it belongs to?

For example, when I go to view the Application Management console in eclipse or Lotus Notes, it shows all the plugins and if it has a child element it shows the parent plugin with a [+] next to it. I am not sure how it forms these associations. Ideally I would just pull back these parent elements instead of everything.
Oleg Tikhonov
Ranch Hand

Joined: Aug 02, 2008
Posts: 55
Well,
Generally speaking Eclipse based applications have a plug-in architecture, like the lego game. All plug-ins are in some container that responsible for providing services, manages them and so forth. For example, start/stop plug-in, install/uninstall etc. It's similar to "operating system" that takes care about resources, processes ... While loading Eclipse application OSGi does all its job in order to start-up application.
I think you would like to find a jar that might be as follows "org.eclipse.osgi_3.2.0.jar". Throughout its API you can achieve your goal easily.

Here is a link to the osgi javadoc.

Ryan Mosely
Greenhorn

Joined: Jan 22, 2010
Posts: 3
Oleg Tikhonov wrote:Well,
Generally speaking Eclipse based applications have a plug-in architecture, like the lego game. All plug-ins are in some container that responsible for providing services, manages them and so forth. For example, start/stop plug-in, install/uninstall etc. It's similar to "operating system" that takes care about resources, processes ... While loading Eclipse application OSGi does all its job in order to start-up application.
I think you would like to find a jar that might be as follows "org.eclipse.osgi_3.2.0.jar". Throughout its API you can achieve your goal easily.

Here is a link to the osgi javadoc.



Hi again, thanks for another reply. I understand how the concept works but I can't seem to locate a particular API besides the bundlecontext.getbundles.getheaders().getkeys() to pull back info on relations between plugins. I am not sure how the Application Manager creates relationships between the plugins and it's installed plugins/fragments. Is there any way I can just pull back a plugin in a particular bucket?

For example, here a the screenshot.



I want to pull back everything on the same level as the one selected, and not get the child elements.
Oleg Tikhonov
Ranch Hand

Joined: Aug 02, 2008
Posts: 55
I couldn't see the picture, but try to answer.
I am not sure how the Application Manager creates relationships between the plugins and it's installed plugins/fragments.

An OSGi bundle can share its packages with other bundles or hide packages from other bundles. This is achieved with the following manifest headers: Export-Package, Import-Package and DynamicImport-Package. A bundle can specify the packages it exports and imports using these manifest headers.
The OSGi API has: ExportedPackage with two methods: getExportingBundle() and getImportingBundles(). This package may or may not be currently wired to other bundles. There is another interesting class PackageAdmin, that allows to inspect the package wiring state of bundles/plug-ins.

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60999
    
  65

"sarca steak", please check your private messages for an important administrative matter.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
jQuery in Action, 2nd edition
 
subject: SWT/Eclipse: Getting Installed Plugins from Eclipse Manage Configuration