/** * Returns the name of the library cache directory for the given bundle. * * @param desc Bundle descriptor. * * @return <code>[bundle ID]_[bundle version]</code> */ private String getBundleLibsCacheDirName(BundleDescription desc) { return desc.getSymbolicName() + "_" + desc.getVersion(); //$NON-NLS-1$ }
/** * Returns a key for a bundle description containing the bundle name and version, * for use in the name/version state index map. */ private String getKey(BundleDescription bundle) { return bundle.getSymbolicName() + ';' + bundle.getVersion(); }
/** * Returns a key for a bundle description containing the bundle name and version, * for use in the name/version state index map. */ private String getKey(BundleDescription bundle) { return bundle.getSymbolicName() + ';' + bundle.getVersion(); }
public String toString() { String symbolicName = bundle.getSymbolicName(); StringBuffer sb = new StringBuffer(symbolicName == null ? bundle.getBundleData().getLocation() : symbolicName); sb.append("; ").append(Constants.BUNDLE_VERSION_ATTRIBUTE); //$NON-NLS-1$ sb.append("=\"").append(description.getVersion().toString()).append("\""); //$NON-NLS-1$//$NON-NLS-2$ return sb.toString(); }
public String toString() { String symbolicName = bundle.getSymbolicName(); StringBuffer sb = new StringBuffer(symbolicName == null ? bundle.getBundleData().getLocation() : symbolicName); sb.append("; ").append(Constants.BUNDLE_VERSION_ATTRIBUTE); //$NON-NLS-1$ sb.append("=\"").append(description.getVersion().toString()).append("\""); //$NON-NLS-1$//$NON-NLS-2$ return sb.toString(); }
private String formatBundleName(BundleDescription b) { String label = b.getSymbolicName(); if (label == null || label.length() == 0) label = b.toString(); else label = label + "_" + b.getVersion(); //$NON-NLS-1$ return label; } }
private String formatBundleName(BundleDescription b) { String label = b.getSymbolicName(); if (label == null || label.length() == 0) label = b.toString(); else label = label + "_" + b.getVersion(); //$NON-NLS-1$ return label; } }
public String getVersion() { BundleDescription desc = model.getBundleDescription(); if (desc != null) { Version version = desc.getVersion(); return (version != null) ? version.toString() : null; } return getValue(Constants.BUNDLE_VERSION, false); }
private String formatBundleName(BundleDescription b) { String label = b.getSymbolicName(); if (label == null || label.length() == 0) label = b.toString(); else label = label + "_" + b.getVersion(); //$NON-NLS-1$ return label; }
public String getObjectText(BundleDescription obj) { String name = fSharedProvider.getObjectText(obj); Version version = obj.getVersion(); // Bug 183417 - Bidi3.3: Elements' labels in the extensions page in the fragment manifest characters order is incorrect // Use the PDELabelProvider.formatVersion function to properly format the version for all languages including bidi return name + ' ' + PDELabelProvider.formatVersion(version.toString()); }
private void setFrameworkVersion(BundleDescription systemBundle) { ExportPackageDescription[] packages = systemBundle.getExportPackages(); for (int i = 0; i < packages.length; i++) if (packages[i].getName().equals(Constants.OSGI_FRAMEWORK_PACKAGE)) { FrameworkProperties.setProperty(Constants.FRAMEWORK_VERSION, packages[i].getVersion().toString()); break; } FrameworkProperties.setProperty(Constants.OSGI_IMPL_VERSION_KEY, systemBundle.getVersion().toString()); }
@Override protected void handleDoubleClick(IStructuredSelection selection) { if (selection.size() == 1) { IPluginModelBase entry = (IPluginModelBase) selection.getFirstElement(); String version = VersionUtil.computeInitialPluginVersion(entry.getBundleDescription().getVersion().toString()); setVersion(version, ""); //$NON-NLS-1$ } }
public static IInstallableUnit[] createEclipseIU(BundleDescription bd, boolean isFolderPlugin, IArtifactKey key, Map<String, String> extraProperties) { ArrayList<IInstallableUnit> iusCreated = new ArrayList<IInstallableUnit>(1); IPublisherInfo info = new PublisherInfo(); String shape = isFolderPlugin ? IBundleShapeAdvice.DIR : IBundleShapeAdvice.JAR; info.addAdvice(new BundleShapeAdvice(bd.getSymbolicName(), PublisherHelper.fromOSGiVersion(bd.getVersion()), shape)); IInstallableUnit iu = BundlesAction.createBundleIU(bd, key, info); addExtraProperties(iu, extraProperties); iusCreated.add(iu); return (iusCreated.toArray(new IInstallableUnit[iusCreated.size()])); }
@Override public boolean select(Viewer viewer, Object parentElement, Object element) { IPluginModelBase plugin = (IPluginModelBase) element; Version hVersion = versions.get(plugin.getBundleDescription().getSymbolicName()); if (hVersion == null) return true; return hVersion.equals(plugin.getBundleDescription().getVersion()); } }
/** * Adds advice for any p2.inf file found in this bundle. */ protected void createAdviceFileAdvice(BundleDescription bundleDescription, IPublisherInfo publisherInfo) { String location = bundleDescription.getLocation(); if (location == null) return; AdviceFileAdvice advice = new AdviceFileAdvice(bundleDescription.getSymbolicName(), PublisherHelper.fromOSGiVersion(bundleDescription.getVersion()), new Path(location), AdviceFileAdvice.BUNDLE_ADVICE_FILE); if (advice.containsAdvice()) publisherInfo.addAdvice(advice); }
/** * Adds advice for any p2.inf file found in this bundle. */ private void createAdviceFileAdvice(BundleDescription bundleDescription, IPublisherInfo publisherInfo) { String location = bundleDescription.getLocation(); if (location == null) return; AdviceFileAdvice advice = new AdviceFileAdvice(bundleDescription.getSymbolicName(), PublisherHelper.fromOSGiVersion(bundleDescription.getVersion()), new Path(location), AdviceFileAdvice.BUNDLE_ADVICE_FILE); if (advice.containsAdvice()) publisherInfo.addAdvice(advice); }
/** * Adds advice for any p2.inf file found in this bundle. */ protected void createAdviceFileAdvice(BundleDescription bundleDescription, IPublisherInfo publisherInfo) { String location = bundleDescription.getLocation(); if (location == null) return; AdviceFileAdvice advice = new AdviceFileAdvice(bundleDescription.getSymbolicName(), PublisherHelper.fromOSGiVersion(bundleDescription.getVersion()), new Path(location), AdviceFileAdvice.BUNDLE_ADVICE_FILE); if (advice.containsAdvice()) publisherInfo.addAdvice(advice); }
void load(BundleDescription bundleDesc, PDEState state) { fId = bundleDesc.getSymbolicName(); fVersion = bundleDesc.getVersion().toString(); fName = state.getPluginName(bundleDesc.getBundleId()); fProviderName = state.getProviderName(bundleDesc.getBundleId()); fHasBundleStructure = state.hasBundleStructure(bundleDesc.getBundleId()); fBundleSourceEntry = state.getBundleSourceEntry(bundleDesc.getBundleId()); loadRuntime(bundleDesc, state); loadImports(bundleDesc); }
private BundleInfo createBundleInfo(BundleDescription toConvert, boolean markedAsStarted, int sl, URI location, String fragmentHost) { BundleInfo result = new BundleInfo(); result.setSymbolicName(toConvert.getSymbolicName()); result.setVersion(toConvert.getVersion().toString()); result.setLocation(location); result.setResolved(toConvert.isResolved()); result.setMarkedAsStarted(markedAsStarted); result.setStartLevel(sl); result.setBundleId(toConvert.getBundleId()); result.setFragmentHost(fragmentHost); return result; }
private BundleInfo createBundleInfo(BundleDescription toConvert, boolean markedAsStarted, int sl, URI location, String fragmentHost) { BundleInfo result = new BundleInfo(); result.setSymbolicName(toConvert.getSymbolicName()); result.setVersion(toConvert.getVersion().toString()); result.setLocation(location); result.setResolved(toConvert.isResolved()); result.setMarkedAsStarted(markedAsStarted); result.setStartLevel(sl); result.setBundleId(toConvert.getBundleId()); result.setFragmentHost(fragmentHost); return result; }