Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Automate updating bundle version numbers
Automate updating bundle version numbers [message #323886] Fri, 11 January 2008 01:45
Eclipse UserFriend
Originally posted by: rkuzsma.empirix.com

I'm writing a plug-in to allow plug-in developers to select a set of
plug-ins and automatically increment their service release numbers by 1.
I'm trying to use the PDE State to do it. I am able to get the existing
version number, but I cannot seem to change it.

IPluginModelBase selectedPlugin;
...
BundleDescription b = selectedPlugin.getBundleDescription();
String oldVersion = b.getVersion().toString();
String newVersion = "1.2.3"; // ... calculated from oldVersion

// create a new bundle
State state = TargetPlatform.getState();
BundleDescription newBundle =
state.getFactory().createBundleDescription(b.getBundleId(),
b.getSymbolicName(), new Version(newVersion), ...);

// update the bundle
state.updateBundle(newBundle);
state.resolve();
// bundle version remains unchanged

Of course, I could cheat by modifying the MANIFEST.MF directly, but I'm
trying to learn the PDE APIs. Am I using the wrong State perhaps?
Previous Topic:Eclipse std project selection dialog
Next Topic:Hook into SaveAction
Goto Forum:
  


Current Time: Sun Jul 13 01:46:01 EDT 2025

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

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

Back to the top