1 11 package org.eclipse.help.standalone; 12 13 import java.io.*; 14 import java.util.ArrayList ; 15 16 import org.eclipse.help.internal.standalone.*; 17 18 33 public class Help { 34 private StandaloneHelp help; 35 36 62 public Help(String [] options) { 63 help = new StandaloneHelp(options); 64 } 65 72 public Help(String pluginsDir) { 73 File plugins = new File(pluginsDir); 74 String install = plugins.getParent(); 75 ArrayList options = new ArrayList (2); 76 if (install != null) { 77 options = new ArrayList (2); 78 options.add("-eclipseHome"); options.add(install); 80 } 81 String [] args = new String [options.size()]; 82 options.toArray(args); 83 help = new StandaloneHelp(args); 84 } 85 88 public void start() throws Exception { 89 help.start(); 90 } 91 94 public void shutdown() throws Exception { 95 help.shutdown(); 96 } 97 100 public void displayHelp() throws Exception { 101 help.displayHelp(); 102 } 103 104 110 public void displayHelp(String href) throws Exception { 111 help.displayHelp(href); 112 } 113 114 124 public void displayContext(String contextId, int x, int y) throws Exception { 125 help.displayContext(contextId, x, y); 126 } 127 128 138 public void displayContextInfopop(String contextId, int x, int y) 139 throws Exception { 140 help.displayContextInfopop(contextId, x, y); 141 } 142 143 169 public static void main(String [] args) { 170 StandaloneHelp.main(args); 171 } 172 } 173 | Popular Tags |