public BundleDescription getPackageExporter() { return exportPackage.getExporter(); } }
public boolean isRemovalPending() { BundleDescription exporter = exportedPackage.getExporter(); if (exporter != null) return exporter.isRemovalPending(); return true; }
private static List getSystemExports(ExportPackageDescription[] matchingExports) { ArrayList list = null; for (int i = 0; i < matchingExports.length; i++) { if (matchingExports[i].getExporter().getBundleId() != 0) continue; if (list == null) list = new ArrayList(); list.add(matchingExports[i]); } return list == null ? Collections.EMPTY_LIST : list; }
private static List getSystemExports(ExportPackageDescription[] matchingExports) { ArrayList list = null; for (int i = 0; i < matchingExports.length; i++) { if (matchingExports[i].getExporter().getBundleId() != 0) continue; if (list == null) list = new ArrayList(); list.add(matchingExports[i]); } return list == null ? Collections.EMPTY_LIST : list; }
private boolean hasMultipleDifferentExporters(Set<PackageNode> versions) { if (versions.size() > 1) { BundleDescription exporter = null; for (PackageNode version : versions) { if (exporter == null) { exporter = version.getExportPackage().getExporter(); } else if (exporter != version.getExportPackage().getExporter()) { return true; } } } return false; }
public boolean isRemovalPending() { BundleDescription exporter = exportedPackage.getExporter(); if (exporter != null) return exporter.isRemovalPending(); return true; }
private BundleDescription[] getImportedBundles(BundleDescription root) { if (root == null) { return new BundleDescription[0]; } ExportPackageDescription[] packages = root.getResolvedImports(); ArrayList resolvedImports = new ArrayList(packages.length); for (int i = 0; i < packages.length; i++) { if (!root.getLocation().equals(packages[i].getExporter().getLocation()) && !resolvedImports.contains(packages[i].getExporter())) { resolvedImports.add(packages[i].getExporter()); } } return (BundleDescription[]) resolvedImports.toArray(new BundleDescription[resolvedImports.size()]); }
public BundleDescription getBundleDescription() { return getExportPackageDescription().getExporter(); }
public BundleDescription getBundleDescription() { return getExportPackageDescription().getExporter(); }
public BundleDescription getBundleDescription() { return getExportPackageDescription().getExporter(); }
public BundleDescription getBundleDescription() { return getExportPackageDescription().getExporter(); }
private static ExportPackageDescription[] getExportsWiredTo(ResolverBundle rb, Map<String, List<StateWire>> stateWires) { // Gather exports that have been wired to ResolverImport[] imports = rb.getImportPackages(); List<ExportPackageDescription> exportsWiredTo = new ArrayList<ExportPackageDescription>(imports.length); List<StateWire> importWires = new ArrayList<StateWire>(imports.length); for (int i = 0; i < imports.length; i++) if (imports[i].getSelectedSupplier() != null) { ExportPackageDescription supplier = (ExportPackageDescription) imports[i].getSelectedSupplier().getBaseDescription(); exportsWiredTo.add(supplier); StateWire wire = newStateWire(rb.getBundleDescription(), imports[i].getVersionConstraint(), supplier.getExporter(), supplier); importWires.add(wire); } if (stateWires != null && !importWires.isEmpty()) stateWires.put(BundleRevision.PACKAGE_NAMESPACE, importWires); return exportsWiredTo.toArray(new ExportPackageDescription[exportsWiredTo.size()]); }
private static ExportPackageDescription[] getExportsWiredTo(ResolverBundle rb, Map<String, List<StateWire>> stateWires) { // Gather exports that have been wired to ResolverImport[] imports = rb.getImportPackages(); List<ExportPackageDescription> exportsWiredTo = new ArrayList<ExportPackageDescription>(imports.length); List<StateWire> importWires = new ArrayList<StateWire>(imports.length); for (int i = 0; i < imports.length; i++) if (imports[i].getSelectedSupplier() != null) { ExportPackageDescription supplier = (ExportPackageDescription) imports[i].getSelectedSupplier().getBaseDescription(); exportsWiredTo.add(supplier); StateWire wire = newStateWire(rb.getBundleDescription(), imports[i].getVersionConstraint(), supplier.getExporter(), supplier); importWires.add(wire); } if (stateWires != null && !importWires.isEmpty()) stateWires.put(BundleRevision.PACKAGE_NAMESPACE, importWires); return exportsWiredTo.toArray(new ExportPackageDescription[exportsWiredTo.size()]); }
private static ExportPackageDescription[] getExportsWiredTo(ResolverBundle rb, Map<String, List<StateWire>> stateWires) { // Gather exports that have been wired to ResolverImport[] imports = rb.getImportPackages(); List<ExportPackageDescription> exportsWiredTo = new ArrayList<>(imports.length); List<StateWire> importWires = new ArrayList<>(imports.length); for (int i = 0; i < imports.length; i++) if (imports[i].getSelectedSupplier() != null) { ExportPackageDescription supplier = (ExportPackageDescription) imports[i].getSelectedSupplier().getBaseDescription(); exportsWiredTo.add(supplier); StateWire wire = newStateWire(rb.getBundleDescription(), imports[i].getVersionConstraint(), supplier.getExporter(), supplier); importWires.add(wire); } if (stateWires != null && !importWires.isEmpty()) stateWires.put(BundleRevision.PACKAGE_NAMESPACE, importWires); return exportsWiredTo.toArray(new ExportPackageDescription[exportsWiredTo.size()]); }
protected void addImportedPackages(ImportPackageSpecification[] packages) { for (ImportPackageSpecification pkg : packages) { if (!fIncludeOptional) if (Constants.RESOLUTION_OPTIONAL.equals(pkg.getDirective(Constants.RESOLUTION_DIRECTIVE))) { continue; } BaseDescription bd = pkg.getSupplier(); // only recursively search statisfied import-packages if (bd != null && bd instanceof ExportPackageDescription) { BundleDescription exporter = ((ExportPackageDescription) bd).getExporter(); if (exporter != null) findDependencies(exporter); } } }
@Override public String getName() { if (!isUndo()) { if(getChangeObject() instanceof String) { return MessageFormat.format(PDEUIMessages.UnresolvedImportFixProcessor_0, (getChangeObject().toString())); } return MessageFormat.format(PDEUIMessages.UnresolvedImportFixProcessor_0, ((ExportPackageDescription) getChangeObject()).getExporter().getName()); } return MessageFormat.format(PDEUIMessages.UnresolvedImportFixProcessor_1, ((ExportPackageDescription) getChangeObject()).getExporter().getName()); }
private ExportedPackageImpl createExportedPackage(ExportPackageDescription description) { BundleDescription exporter = description.getExporter(); if (exporter == null || exporter.getHost() != null) return null; Object userObject = exporter.getUserObject(); if (!(userObject instanceof BundleLoaderProxy)) { BundleHost bundle = (BundleHost) framework.getBundle(exporter.getBundleId()); if (bundle == null) return null; userObject = bundle.getLoaderProxy(); } return new ExportedPackageImpl(description, (BundleLoaderProxy) userObject); }
private ExportedPackageImpl createExportedPackage(ExportPackageDescription description) { BundleDescription exporter = description.getExporter(); if (exporter == null || exporter.getHost() != null) return null; Object userObject = exporter.getUserObject(); if (!(userObject instanceof BundleLoaderProxy)) { BundleHost bundle = (BundleHost) framework.getBundle(exporter.getBundleId()); if (bundle == null) return null; userObject = bundle.getLoaderProxy(); } return new ExportedPackageImpl(description, (BundleLoaderProxy) userObject); }
final PackageSource createExportPackageSource(ExportPackageDescription export, KeyedHashSet visited) { BundleLoaderProxy exportProxy = getLoaderProxy(export.getExporter()); if (exportProxy == null) // TODO log error!! return null; PackageSource requiredSource = exportProxy.getBundleLoader().findRequiredSource(export.getName(), visited); PackageSource exportSource = exportProxy.createPackageSource(export, false); if (requiredSource == null) return exportSource; return createMultiSource(export.getName(), new PackageSource[] {requiredSource, exportSource}); }
final PackageSource createExportPackageSource(ExportPackageDescription export, KeyedHashSet visited) { BundleLoaderProxy exportProxy = getLoaderProxy(export.getExporter()); if (exportProxy == null) // TODO log error!! return null; PackageSource requiredSource = exportProxy.getBundleLoader().findRequiredSource(export.getName(), visited); PackageSource exportSource = exportProxy.createPackageSource(export, false); if (requiredSource == null) return exportSource; return createMultiSource(export.getName(), new PackageSource[] {requiredSource, exportSource}); }