congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
IPublisherInfo.getAdvice
Code IndexAdd Tabnine to your IDE (free)

How to use
getAdvice
method
in
org.eclipse.equinox.p2.publisher.IPublisherInfo

Best Java code snippets using org.eclipse.equinox.p2.publisher.IPublisherInfo.getAdvice (Showing top 20 results out of 315)

origin: org.eclipse.osgi/org.eclipse.equinox.p2.publisher.eclipse

private IBrandingAdvice getBrandingAdvice() {
  // there is expected to only be one branding advice for a given configspec so
  // just return the first one we find.
  Collection<IBrandingAdvice> advice = info.getAdvice(configSpec, true, null, null, IBrandingAdvice.class);
  for (Iterator<IBrandingAdvice> i = advice.iterator(); i.hasNext();)
    return i.next();
  return null;
}
origin: org.eclipse.platform/org.eclipse.equinox.p2.publisher.eclipse

private IBrandingAdvice getBrandingAdvice() {
  // there is expected to only be one branding advice for a given configspec so
  // just return the first one we find.
  Collection<IBrandingAdvice> advice = info.getAdvice(configSpec, true, null, null, IBrandingAdvice.class);
  for (Iterator<IBrandingAdvice> i = advice.iterator(); i.hasNext();)
    return i.next();
  return null;
}
origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.p2.publisher.eclipse

private IBrandingAdvice getBrandingAdvice() {
  // there is expected to only be one branding advice for a given configspec so
  // just return the first one we find.
  Collection<IBrandingAdvice> advice = info.getAdvice(configSpec, true, null, null, IBrandingAdvice.class);
  for (Iterator<IBrandingAdvice> i = advice.iterator(); i.hasNext();)
    return i.next();
  return null;
}
origin: org.eclipse.platform/org.eclipse.equinox.p2.publisher

protected static InstallableUnitDescription[] processAdditionalInstallableUnitsAdvice(IInstallableUnit iu, IPublisherInfo publisherInfo) {
  Collection<IAdditionalInstallableUnitAdvice> advice = publisherInfo.getAdvice(null, false, iu.getId(), iu.getVersion(), IAdditionalInstallableUnitAdvice.class);
  if (advice.isEmpty())
    return null;
  List<InstallableUnitDescription> ius = new ArrayList<>();
  for (IAdditionalInstallableUnitAdvice entry : advice) {
    InstallableUnitDescription[] others = entry.getAdditionalInstallableUnitDescriptions(iu);
    if (others != null)
      ius.addAll(Arrays.asList(others));
  }
  return ius.toArray(new InstallableUnitDescription[ius.size()]);
}
origin: org.eclipse.equinox.p2/publisher

protected static InstallableUnitDescription[] processAdditionalInstallableUnitsAdvice(IInstallableUnit iu, IPublisherInfo publisherInfo) {
  Collection<IAdditionalInstallableUnitAdvice> advice = publisherInfo.getAdvice(null, false, iu.getId(), iu.getVersion(), IAdditionalInstallableUnitAdvice.class);
  if (advice.isEmpty())
    return null;
  List<InstallableUnitDescription> ius = new ArrayList<InstallableUnitDescription>();
  for (IAdditionalInstallableUnitAdvice entry : advice) {
    InstallableUnitDescription[] others = entry.getAdditionalInstallableUnitDescriptions(iu);
    if (others != null)
      ius.addAll(Arrays.asList(others));
  }
  return ius.toArray(new InstallableUnitDescription[ius.size()]);
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.p2.publisher

protected static InstallableUnitDescription[] processAdditionalInstallableUnitsAdvice(IInstallableUnit iu, IPublisherInfo publisherInfo) {
  Collection<IAdditionalInstallableUnitAdvice> advice = publisherInfo.getAdvice(null, false, iu.getId(), iu.getVersion(), IAdditionalInstallableUnitAdvice.class);
  if (advice.isEmpty())
    return null;
  List<InstallableUnitDescription> ius = new ArrayList<InstallableUnitDescription>();
  for (IAdditionalInstallableUnitAdvice entry : advice) {
    InstallableUnitDescription[] others = entry.getAdditionalInstallableUnitDescriptions(iu);
    if (others != null)
      ius.addAll(Arrays.asList(others));
  }
  return ius.toArray(new InstallableUnitDescription[ius.size()]);
}
origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.p2.publisher

protected static InstallableUnitDescription[] processAdditionalInstallableUnitsAdvice(IInstallableUnit iu, IPublisherInfo publisherInfo) {
  Collection<IAdditionalInstallableUnitAdvice> advice = publisherInfo.getAdvice(null, false, iu.getId(), iu.getVersion(), IAdditionalInstallableUnitAdvice.class);
  if (advice.isEmpty())
    return null;
  List<InstallableUnitDescription> ius = new ArrayList<InstallableUnitDescription>();
  for (IAdditionalInstallableUnitAdvice entry : advice) {
    InstallableUnitDescription[] others = entry.getAdditionalInstallableUnitDescriptions(iu);
    if (others != null)
      ius.addAll(Arrays.asList(others));
  }
  return ius.toArray(new InstallableUnitDescription[ius.size()]);
}
origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.p2.publisher.eclipse

private static boolean isDir(BundleDescription bundle, IPublisherInfo info) {
  Collection<IBundleShapeAdvice> advice = info.getAdvice(null, true, bundle.getSymbolicName(), PublisherHelper.fromOSGiVersion(bundle.getVersion()), IBundleShapeAdvice.class);
  // if the advice has a shape, use it
  if (advice != null && !advice.isEmpty()) {
    // we know there is some advice but if there is more than one, take the first.
    String shape = advice.iterator().next().getShape();
    if (shape != null)
      return shape.equals(IBundleShapeAdvice.DIR);
  }
  // otherwise go with whatever we figured out from the manifest or the shape on disk
  @SuppressWarnings("unchecked")
  Map<String, String> manifest = (Map<String, String>) bundle.getUserObject();
  String format = manifest.get(BUNDLE_SHAPE);
  return DIR.equals(format);
}
origin: org.eclipse.osgi/org.eclipse.equinox.p2.publisher.eclipse

private static boolean isDir(BundleDescription bundle, IPublisherInfo info) {
  Collection<IBundleShapeAdvice> advice = info.getAdvice(null, true, bundle.getSymbolicName(), PublisherHelper.fromOSGiVersion(bundle.getVersion()), IBundleShapeAdvice.class);
  // if the advice has a shape, use it
  if (advice != null && !advice.isEmpty()) {
    // we know there is some advice but if there is more than one, take the first.
    String shape = advice.iterator().next().getShape();
    if (shape != null)
      return shape.equals(IBundleShapeAdvice.DIR);
  }
  // otherwise go with whatever we figured out from the manifest or the shape on disk
  @SuppressWarnings("unchecked")
  Map<String, String> manifest = (Map<String, String>) bundle.getUserObject();
  String format = manifest.get(BUNDLE_SHAPE);
  return DIR.equals(format);
}
origin: org.eclipse.platform/org.eclipse.equinox.p2.publisher.eclipse

private static boolean isDir(BundleDescription bundle, IPublisherInfo info) {
  Collection<IBundleShapeAdvice> advice = info.getAdvice(null, true, bundle.getSymbolicName(), PublisherHelper.fromOSGiVersion(bundle.getVersion()), IBundleShapeAdvice.class);
  // if the advice has a shape, use it
  if (advice != null && !advice.isEmpty()) {
    // we know there is some advice but if there is more than one, take the first.
    String shape = advice.iterator().next().getShape();
    if (shape != null)
      return shape.equals(IBundleShapeAdvice.DIR);
  }
  // otherwise go with whatever we figured out from the manifest or the shape on disk
  @SuppressWarnings("unchecked")
  Map<String, String> manifest = (Map<String, String>) bundle.getUserObject();
  String format = manifest.get(BUNDLE_SHAPE);
  return DIR.equals(format);
}
origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.p2.publisher

protected static void processLicense(InstallableUnitDescription iu, IPublisherInfo info) {
  Collection<ILicenseAdvice> advice = info.getAdvice(null, true, iu.getId(), iu.getVersion(), ILicenseAdvice.class);
  if (advice.size() > 0) {
    // Only process the first license we find for this IU.
    ILicenseAdvice entry = advice.iterator().next();
    String licenseText = entry.getLicenseText() == null ? "" : entry.getLicenseText(); //$NON-NLS-1$
    String licenseUrl = entry.getLicenseURL() == null ? "" : entry.getLicenseURL(); //$NON-NLS-1$
    if (licenseText.length() > 0 || licenseUrl.length() > 0)
      iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(licenseUrl), licenseText)});
  }
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.p2.publisher

protected static void processTouchpointAdvice(InstallableUnitDescription iu, Map<String, ? extends Object> currentInstructions, IPublisherInfo info, String configSpec) {
  Collection<ITouchpointAdvice> advice = info.getAdvice(configSpec, false, iu.getId(), iu.getVersion(), ITouchpointAdvice.class);
  if (currentInstructions == null) {
    if (advice == null || advice.isEmpty())
      return;
    currentInstructions = Collections.emptyMap();
  }
  ITouchpointData result = MetadataFactory.createTouchpointData(currentInstructions);
  if (advice != null) {
    for (ITouchpointAdvice entry : advice) {
      result = entry.getTouchpointData(result);
    }
  }
  iu.addTouchpointData(result);
}
origin: org.eclipse.platform/org.eclipse.equinox.p2.publisher

protected static void processTouchpointAdvice(InstallableUnitDescription iu, Map<String, ? extends Object> currentInstructions, IPublisherInfo info, String configSpec) {
  Collection<ITouchpointAdvice> advice = info.getAdvice(configSpec, false, iu.getId(), iu.getVersion(), ITouchpointAdvice.class);
  if (currentInstructions == null) {
    if (advice == null || advice.isEmpty())
      return;
    currentInstructions = Collections.emptyMap();
  }
  ITouchpointData result = MetadataFactory.createTouchpointData(currentInstructions);
  if (advice != null) {
    for (ITouchpointAdvice entry : advice) {
      result = entry.getTouchpointData(result);
    }
  }
  iu.addTouchpointData(result);
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.p2.publisher

protected static void processLicense(InstallableUnitDescription iu, IPublisherInfo info) {
  Collection<ILicenseAdvice> advice = info.getAdvice(null, true, iu.getId(), iu.getVersion(), ILicenseAdvice.class);
  if (advice.size() > 0) {
    // Only process the first license we find for this IU.
    ILicenseAdvice entry = advice.iterator().next();
    String licenseText = entry.getLicenseText() == null ? "" : entry.getLicenseText(); //$NON-NLS-1$
    String licenseUrl = entry.getLicenseURL() == null ? "" : entry.getLicenseURL(); //$NON-NLS-1$
    if (licenseText.length() > 0 || licenseUrl.length() > 0)
      iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(licenseUrl), licenseText)});
  }
}
origin: org.eclipse.equinox.p2/publisher

protected static void processLicense(InstallableUnitDescription iu, IPublisherInfo info) {
  Collection<ILicenseAdvice> advice = info.getAdvice(null, true, iu.getId(), iu.getVersion(), ILicenseAdvice.class);
  if (advice.size() > 0) {
    // Only process the first license we find for this IU.
    ILicenseAdvice entry = advice.iterator().next();
    String licenseText = entry.getLicenseText() == null ? "" : entry.getLicenseText(); //$NON-NLS-1$
    String licenseUrl = entry.getLicenseURL() == null ? "" : entry.getLicenseURL(); //$NON-NLS-1$
    if (licenseText.length() > 0 || licenseUrl.length() > 0)
      iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(licenseUrl), licenseText)});
  }
}
origin: org.eclipse.platform/org.eclipse.equinox.p2.publisher

protected static void processLicense(InstallableUnitDescription iu, IPublisherInfo info) {
  Collection<ILicenseAdvice> advice = info.getAdvice(null, true, iu.getId(), iu.getVersion(), ILicenseAdvice.class);
  if (advice.size() > 0) {
    // Only process the first license we find for this IU.
    ILicenseAdvice entry = advice.iterator().next();
    String licenseText = entry.getLicenseText() == null ? "" : entry.getLicenseText(); //$NON-NLS-1$
    String licenseUrl = entry.getLicenseURL() == null ? "" : entry.getLicenseURL(); //$NON-NLS-1$
    if (licenseText.length() > 0 || licenseUrl.length() > 0)
      iu.setLicenses(new ILicense[] {MetadataFactory.createLicense(toURIOrNull(licenseUrl), licenseText)});
  }
}
origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.p2.publisher

private IMatchExpression<IInstallableUnit> getFilterAdvice(IVersionedId name) {
  if (info == null)
    return null;
  Collection<IFilterAdvice> filterAdvice = info.getAdvice(CONFIG_ANY, true, name.getId(), name.getVersion(), IFilterAdvice.class);
  for (IFilterAdvice advice : filterAdvice) {
    IMatchExpression<IInstallableUnit> result = advice.getFilter(name.getId(), name.getVersion(), false);
    if (result != null)
      return result;
  }
  return null;
}
origin: org.eclipse.equinox.p2/publisher

private IMatchExpression<IInstallableUnit> getFilterAdvice(IVersionedId name) {
  if (info == null)
    return null;
  Collection<IFilterAdvice> filterAdvice = info.getAdvice(CONFIG_ANY, true, name.getId(), name.getVersion(), IFilterAdvice.class);
  for (IFilterAdvice advice : filterAdvice) {
    IMatchExpression<IInstallableUnit> result = advice.getFilter(name.getId(), name.getVersion(), false);
    if (result != null)
      return result;
  }
  return null;
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.p2.publisher

private IMatchExpression<IInstallableUnit> getFilterAdvice(IVersionedId name) {
  if (info == null)
    return null;
  Collection<IFilterAdvice> filterAdvice = info.getAdvice(CONFIG_ANY, true, name.getId(), name.getVersion(), IFilterAdvice.class);
  for (IFilterAdvice advice : filterAdvice) {
    IMatchExpression<IInstallableUnit> result = advice.getFilter(name.getId(), name.getVersion(), false);
    if (result != null)
      return result;
  }
  return null;
}
origin: org.eclipse.platform/org.eclipse.equinox.p2.publisher

private IMatchExpression<IInstallableUnit> getFilterAdvice(IVersionedId name) {
  if (info == null)
    return null;
  Collection<IFilterAdvice> filterAdvice = info.getAdvice(CONFIG_ANY, true, name.getId(), name.getVersion(), IFilterAdvice.class);
  for (IFilterAdvice advice : filterAdvice) {
    IMatchExpression<IInstallableUnit> result = advice.getFilter(name.getId(), name.getVersion(), false);
    if (result != null)
      return result;
  }
  return null;
}
org.eclipse.equinox.p2.publisherIPublisherInfogetAdvice

Javadoc

Returns the registered advice for the given configuration of WS, OS and ARCH where the advice is of the given type. If mergeDefault is true then the advice for the default configuration is merged into the result.

Popular methods of IPublisherInfo

  • getArtifactRepository
    Returns the artifact repository into which any publishable artifacts are published or null if none.
  • getMetadataRepository
    Returns the metadata repository into which any publishable metadata is published or null if none.
  • getArtifactOptions
    Returns whether or not artifacts themselves should be published.
  • getConfigurations
    Returns the configurations being published. Each configuration is a string of the form ws.os.arch de
  • getContextMetadataRepository
    Returns the metadata repository given to the publisher as context for the publisher actions. May be
  • addAdvice
    Add the given advice to the set of publishing advices.

Popular in Java

  • Reactive rest calls using spring rest template
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • getContentResolver (Context)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now