Package org.eclipse.help

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

Related Classes of org.eclipse.help.IHelpContentProducer

Copyright © 2018 www.massapicom. 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.