Examples of IHelpContentProducer


Examples of org.eclipse.help.IHelpContentProducer

  /**
   * Opens an input stream to a file contained in a plugin. This includes NL lookup.
   */
  public static InputStream openFromProducer(Bundle pluginDesc, String file, String locale) {
    IHelpContentProducer producer = getContentProducer(pluginDesc.getSymbolicName());
    if (producer == null) {
      return null;
    }
    if (locale == null || locale.length() <= 0) {
      locale = Platform.getNL();
    }
    Locale l;
    if (locale.length() >= 5) {
      l = new Locale(locale.substring(0, 2), locale.substring(3, 5));
    } else if (locale.length() >= 2) {
      l = new Locale(locale.substring(0, 2), ""); //$NON-NLS-1$
    } else {
      l = Locale.getDefault();
    }
    return producer.getInputStream(pluginDesc.getSymbolicName(), file, l);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.