Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » State doesn't return all plugin versions(Issue with State.getBundles(String symbolicName))
State doesn't return all plugin versions [message #644627] Mon, 13 December 2010 09:31 Go to next message
Eclipse UserFriend
I am using org.eclipse.osgi.service.resolver.State to get all versions of a Plugin installed i.e. latest version and older versions.

The code I'm using is:

 PlatformAdmin platformAdmin = Platform.getPlatformAdmin();
 State state = platformAdmin.getState();
 BundleDescription[] bundles = state.getBundles("com.my.plugin");



The State.getBundles(String symbolicName) is supposed to return all bundle descriptions with the given bundle symbolic name.

However, it is only returning the latest version 2.0.0. Older version 1.0.0 is not picked up.
Re: State doesn't return all plugin versions [message #644648 is a reply to message #644627] Mon, 13 December 2010 10:46 Go to previous messageGo to next message
Eclipse UserFriend
DK wrote:
>
> The State.getBundles(String symbolicName) is supposed to return all
> bundle descriptions with the given bundle symbolic name.
>
> However, it is only returning the latest version 2.0.0. Older version
> 1.0.0 is not picked up.

Is it a singleton bundle?

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Re: State doesn't return all plugin versions [message #644722 is a reply to message #644648] Mon, 13 December 2010 17:48 Go to previous messageGo to next message
Eclipse UserFriend
Yes I had to make the plugin a singleton because it defines an extension.

The plugin's extension basically defines a path to a resource (a file within the plugin).

The plugin does not contain any code.
Re: State doesn't return all plugin versions [message #644841 is a reply to message #644722] Tue, 14 December 2010 07:37 Go to previous message
Eclipse UserFriend
If it's a singleton, then the system only allows one version (and you should only get back on state). This sounds like it is working correctly.

PW
Previous Topic:TableViewer with SWT.SINGLE rejects CTRL-click to clear selection
Next Topic:SaveAllAction NonPartSourcs
Goto Forum:
  


Current Time: Sun Jul 27 12:52:37 EDT 2025

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

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

Back to the top