String provider = null;
String description = null;
boolean isQualifierUpdate = false;
if (fUpdates != null && fUpdates.length > 0) {
IFeature oldFeature = fUpdates[0].getOldFeature();
IFeature newFeature = fUpdates[0].getFeature();
/* Versions */
org.eclipse.core.runtime.PluginVersionIdentifier oldVersion = (oldFeature != null) ? oldFeature.getVersionedIdentifier().getVersion() : null;
org.eclipse.core.runtime.PluginVersionIdentifier newVersion = newFeature.getVersionedIdentifier().getVersion();
if (oldVersion != null)
oldVer = oldVersion.getMajorComponent() + "." + oldVersion.getMinorComponent() + "." + oldVersion.getServiceComponent(); //$NON-NLS-1$ //$NON-NLS-2$
newVer = newVersion.getMajorComponent() + "." + newVersion.getMinorComponent() + "." + newVersion.getServiceComponent(); //$NON-NLS-1$ //$NON-NLS-2$
/* Special Treat Case of a Qualifier Update */
if (newVer.equals(oldVer) && oldVersion != null) {
isQualifierUpdate = true;
String newQualifierComponent = newVersion.getQualifierComponent();
String oldQualifierComponent = oldVersion.getQualifierComponent();
if (newQualifierComponent.length() == 12 && oldQualifierComponent.length() == 12) {
newVer += " (" + formatQualifier(newQualifierComponent) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
oldVer += " (" + formatQualifier(oldQualifierComponent) + ")"; //$NON-NLS-1$ //$NON-NLS-2$
} else {
newVer += "." + newQualifierComponent; //$NON-NLS-1$
oldVer += "." + oldQualifierComponent; //$NON-NLS-1$
}
}
/* Other */
dlSize = newFeature.getDownloadSize() * 1000;
provider = newFeature.getProvider();
/* Description */
if (!isQualifierUpdate) {
ICategory[] categories = newFeature.getSite().getCategories();
if (categories.length > 0) {
IURLEntry descriptionEntry = categories[0].getDescription();
if (descriptionEntry != null)
description = descriptionEntry.getAnnotation();
}