/** * Return an update descriptor localized for the receiver's locale. * * @param iu the IInstallableUnit in question * @return the localized update descriptor defined by the IInstallableUnit */ public IUpdateDescriptor getUpdateDescriptor(IInstallableUnit iu, String locale) { if (locale == null) locale = getCurrentLocale(); IUpdateDescriptor descriptor = iu.getUpdateDescriptor(); String body = (descriptor != null ? descriptor.getDescription() : null); if (body == null || body.length() <= 1 || body.charAt(0) != '%') return descriptor; final String actualKey = body.substring(1); // Strip off the % body = getLocalizedIUProperty(iu, actualKey, locale); return MetadataFactory.createUpdateDescriptor(descriptor.getIUsBeingUpdated(), descriptor.getSeverity(), body, descriptor.getLocation()); }
public void createControl(Composite parent) { IInstallableUnit updateIU = getUpdate().replacement; String url = null; if (updateIU.getUpdateDescriptor().getLocation() != null) try { url = URIUtil.toURL(updateIU.getUpdateDescriptor().getLocation()).toExternalForm(); } catch (MalformedURLException e) {