* This method hunts down the version recorded in the current product.
*
* @throws IOException
*/
private void loadVersion() {
IProduct product = Platform.getProduct();
if (product == null || !(UDIG_PRODUCT_ID.equals(product.getId()))) {
// chances are someone is using the SDK with their own
// application or product.
String message = "Unable to parse version from about.mappings file. Defaulting to a blank string."; //$NON-NLS-1$
this.getLog().log(new Status(IStatus.INFO, ID, 0, message, null));
this.version = "";
return;
}
Bundle pluginBundle = product.getDefiningBundle();
URL mappingsURL = FileLocator.find(pluginBundle, new Path(MAPPINGS_FILENAME), null);
if (mappingsURL != null) {
try {
mappingsURL = FileLocator.resolve(mappingsURL);