1 11 package org.eclipse.help; 12 13 import java.io.InputStream ; 14 15 import org.eclipse.core.runtime.Platform; 16 import org.eclipse.help.internal.HelpPlugin; 17 import org.eclipse.help.internal.HelpPlugin.IHelpProvider; 18 19 30 public final class HelpSystem { 31 32 private static boolean fShared; 33 34 37 private HelpSystem() { 38 } 40 41 48 public static IContext getContext(String contextId) { 49 return HelpPlugin.getContextManager().getContext(contextId, Platform.getNL()); 50 } 51 52 60 public static IContext getContext(String contextId, String locale) { 61 return HelpPlugin.getContextManager().getContext(contextId, locale); 62 } 63 64 70 public static IToc[] getTocs() { 71 return HelpPlugin.getTocManager().getTocs(Platform.getNL()); 72 } 73 74 80 public static IIndex getIndex() { 81 return HelpPlugin.getIndexManager().getIndex(Platform.getNL()); 82 } 83 84 99 public static InputStream getHelpContent(String href) { 100 return getHelpContent(href, Platform.getNL()); 101 } 102 103 120 public static InputStream getHelpContent(String href, String locale) { 121 IHelpProvider provider = HelpPlugin.getDefault().getHelpProvider(); 122 if (provider != null) { 123 return provider.getHelpContent(href, locale); 124 } 125 return null; 126 } 127 128 147 public static boolean isShared() { 148 return fShared; 149 } 150 151 165 public static void setShared(boolean shared) { 166 fShared = shared; 167 } 168 } 169 | Popular Tags |