Sort of:
Platform.getBundle("my.feature.id").getHeaders().get("Bundle-Version");
gotta do the trick.
( ), :
this.getBundle() , super.start(BundleContext).
, this.getBundle() start(BundleContext) super.start(), null.
, "" :
public static String getPlatformVersion() {
String version = null;
try {
Dictionary dictionary =
org.eclipse.ui.internal.WorkbenchPlugin.getDefault().getBundle().getHeaders();
version = (String) dictionary.get("Bundle-Version");
} catch (NoClassDefFoundError e) {
version = getProductVersion();
}
return version;
}
public static String getProductVersion() {
String version = null;
try {
IProduct product = Platform.getProduct();
String aboutText = product.getProperty("aboutText");
String pattern = "Version: (.*)\n";
Pattern p = Pattern.compile(pattern);
Matcher m = p.matcher(aboutText);
boolean found = m.find();
if (found) {
version = m.group(1);
}
} catch (Exception e) {
}
return version;
}