Class BrandingProperties

java.lang.Object
org.eclipse.ui.internal.BrandingProperties
Direct Known Subclasses:
BundleGroupProperties, ProductProperties

public abstract class BrandingProperties extends Object
The branding properties are retrieved as strings, but often used as other types (e.g., java.net.URLs. This class provides some utility functions for converting the string values to these well known classes. This may be subclassed by clients that use more than just these few types.
  • Constructor Details

    • BrandingProperties

      public BrandingProperties()
  • Method Details

    • getUrl

      public static URL getUrl(String value, Bundle definingBundle)
      Create an url from the argument absolute or relative path. The bundle parameter is used as the base for relative paths and is allowed to be null.
      Parameters:
      value - the absolute or relative path
      definingBundle - bundle to be used for relative paths (may be null)
    • getImage

      public static ImageDescriptor getImage(String value, Bundle definingBundle)
      Create a descriptor from the argument absolute or relative path to an image file. bundle parameter is used as the base for relative paths and is allowed to be null.
      Parameters:
      value - the absolute or relative path
      definingBundle - bundle to be used for relative paths (may be null)
    • getURLs

      public static URL[] getURLs(String value, Bundle definingBundle)
      Returns a array of URL for the given property or null. The property value should be a comma separated list of urls (either absolute or relative to the argument bundle). Tokens that do not represent a valid url will be represented with a null entry in the returned array.
      Parameters:
      value - value of a property that contains a comma-separated list of product relative urls
      definingBundle - bundle to be used as base for relative paths (may be null)
      Returns:
      a URL for the given property, or null
    • getImages

      public static ImageDescriptor[] getImages(String value, Bundle definingBundle)
      Returns an array of image descriptors for the given property, or null. The property value should be a comma separated list of image paths. Each path should either be absolute or relative to the optional bundle parameter.
      Parameters:
      value - value of a property that contains a comma-separated list of product relative urls describing images
      definingBundle - bundle to be used for relative paths (may be null)
      Returns:
      an array of image descriptors for the given property, or null