public boolean removeBundle(BundleDescription description) { if (description.getLocation() != null) updated.remove(description.getLocation()); if (!super.removeBundle(description)) return false; return true; }
public boolean removeBundle(BundleDescription description) { if (description.getLocation() != null) updated.remove(description.getLocation()); if (!super.removeBundle(description)) return false; return true; }
public boolean removeBundle(BundleDescription description) { if (description.getLocation() != null) updated.remove(description.getLocation()); if (!super.removeBundle(description)) return false; return true; }
public boolean removeBundle(BundleDescription description) { if (description.getLocation() != null) updated.remove(description.getLocation()); if (!super.removeBundle(description)) return false; return true; }
public boolean updateBundle(BundleDescription newDescription) { if (!super.updateBundle(newDescription)) return false; updated.add(newDescription.getLocation()); return true; }
public boolean updateBundle(BundleDescription newDescription) { if (!super.updateBundle(newDescription)) return false; updated.add(newDescription.getLocation()); return true; }
public boolean updateBundle(BundleDescription newDescription) { if (!super.updateBundle(newDescription)) return false; updated.add(newDescription.getLocation()); return true; }
public static String getMavenBaseVersion( MavenSession session, BundleDescription bundle ) { MavenProject mavenProject = MavenSessionUtils.getMavenProject( session, bundle.getLocation() ); if ( mavenProject != null ) { return mavenProject.getVersion(); // not expanded yet } return null; }
public BundleDescription getBundleByLocation(String location) { synchronized (this.monitor) { for (Iterator<KeyedElement> i = bundleDescriptions.iterator(); i.hasNext();) { BundleDescription current = (BundleDescription) i.next(); if (location.equals(current.getLocation())) return current; } return null; } }
private IInstallableUnitFragment createHostLocalizationFragment(IInstallableUnit bundleIU, BundleDescription bd, String hostId, String[] hostBundleManifestValues) { Map<Locale, Map<String, String>> hostLocalizations = getHostLocalizations(new File(bd.getLocation()), hostBundleManifestValues); if (hostLocalizations == null || hostLocalizations.isEmpty()) return null; return createLocalizationFragmentOfHost(bd, hostId, hostBundleManifestValues, hostLocalizations); }
private IInstallableUnitFragment createHostLocalizationFragment(IInstallableUnit bundleIU, BundleDescription bd, String hostId, String[] hostBundleManifestValues) { Map<Locale, Map<String, String>> hostLocalizations = getHostLocalizations(new File(bd.getLocation()), hostBundleManifestValues); if (hostLocalizations == null || hostLocalizations.isEmpty()) return null; return createLocalizationFragmentOfHost(bd, hostId, hostBundleManifestValues, hostLocalizations); }
private boolean isFrameworkExtension(BundleDescription bundle) { OsgiManifest mf = manifestReader.loadManifest(new File(bundle.getLocation())); ManifestElement[] elements = mf.getManifestElements(Constants.FRAGMENT_HOST); if (elements.length == 1) { if (Constants.EXTENSION_FRAMEWORK.equals(elements[0].getDirective(Constants.EXTENSION_DIRECTIVE))) { return true; } } return false; } }
protected static IPluginModelBase resolveLibraryInFragments(IPluginModelBase model, String libraryName) { BundleDescription desc = model.getBundleDescription(); if (desc != null) { BundleDescription[] fragments = desc.getFragments(); for (int i = 0; i < fragments.length; i++) { if (new File(fragments[i].getLocation(), libraryName).exists()) return PluginRegistry.findModel(fragments[i]); } } return null; }
private void addBundleToState(BundleDescription bundleDescription) { state.addBundle(bundleDescription); URI location = FileUtils.getRealLocation(manipulator, bundleDescription.getLocation()); locationStateIndex.put(location, bundleDescription); nameVersionStateIndex.put(getKey(bundleDescription), bundleDescription); }
private void removeBundleFromState(BundleDescription bundleDescription) { URI location = FileUtils.getRealLocation(manipulator, bundleDescription.getLocation()); locationStateIndex.remove(location); nameVersionStateIndex.remove(getKey(bundleDescription)); state.removeBundle(bundleDescription); } }
private void removeBundleFromState(BundleDescription bundleDescription) { URI location = FileUtils.getRealLocation(manipulator, bundleDescription.getLocation()); locationStateIndex.remove(location); nameVersionStateIndex.remove(getKey(bundleDescription)); state.removeBundle(bundleDescription); } }
private void createStateIndexes() { BundleDescription[] currentInstalledBundles = state.getBundles(); for (int i = 0; i < currentInstalledBundles.length; i++) { URI location = FileUtils.getRealLocation(manipulator, currentInstalledBundles[i].getLocation()); locationStateIndex.put(location, currentInstalledBundles[i]); nameVersionStateIndex.put(getKey(currentInstalledBundles[i]), currentInstalledBundles[i]); } }
/** * 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); }