KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > boot > BootLoader


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.boot;
12
13 import java.io.IOException JavaDoc;
14 import java.net.URL JavaDoc;
15 import org.eclipse.core.internal.boot.PlatformConfiguration;
16 import org.eclipse.core.internal.runtime.InternalPlatform;
17 import org.eclipse.core.runtime.Platform;
18 import org.eclipse.update.configurator.IPlatformConfiguration;
19 import org.eclipse.update.configurator.IPlatformConfigurationFactory;
20 import org.osgi.framework.BundleContext;
21 import org.osgi.framework.ServiceReference;
22
23 /**
24  * Special boot loader class for the Eclipse Platform. This class cannot
25  * be instantiated; all functionality is provided by static methods.
26  * <p>
27  * The Eclipse Platform makes heavy use of Java class loaders for
28  * loading plug-ins. Even the Platform Core Runtime itself, including
29  * the <code>Platform</code> class, needs to be loaded by a special
30  * class loader. The upshot is that a client program (such as a Java main
31  * program, a servlet) cannot directly reference even the
32  * <code>Platform</code> class. Instead, a client must use this
33  * loader class for initializing the platform, invoking functionality
34  * defined in plug-ins, and shutting down the platform when done.
35  * </p>
36  *
37  * @see Platform
38  * @deprecated
39  * In Eclipse 3.0 the runtime has been refactored such that the <code>BootLoader</code>
40  * class is no longer relevant. Most of the function found on <code>BootLoader</code> is
41  * however still supported and has been relocated described in the method comments.
42  * <p>
43  * This interface must only be used by plug-ins
44  * which explicitly require the org.eclipse.core.runtime.compatibility plug-in.
45  * </p>
46  */

47 public final class BootLoader {
48
49     /**
50      * Controls the debug of platform configuration.
51      */

52     public static boolean CONFIGURATION_DEBUG = false;
53
54     /**
55      * The unique identifier constant (value "<code>org.eclipse.core.boot</code>")
56      * of the Core Boot (pseudo-) plug-in.
57      */

58     public static final String JavaDoc PI_BOOT = "org.eclipse.core.boot"; //$NON-NLS-1$
59

60     /**
61      * Constant string (value "win32") indicating the platform is running on a
62      * Window 32-bit operating system (e.g., Windows 98, NT, 2000).
63      * @deprecated Replaced by {@link Platform#OS_WIN32}.
64      */

65     public static final String JavaDoc OS_WIN32 = "win32";//$NON-NLS-1$
66

67     /**
68      * Constant string (value "linux") indicating the platform is running on a
69      * Linux-based operating system.
70      * @deprecated Replaced by {@link Platform#OS_LINUX}.
71      */

72     public static final String JavaDoc OS_LINUX = "linux";//$NON-NLS-1$
73

74     /**
75      * Constant string (value "aix") indicating the platform is running on an
76      * AIX-based operating system.
77      * @deprecated Replaced by {@link Platform#OS_AIX}.
78      */

79     public static final String JavaDoc OS_AIX = "aix";//$NON-NLS-1$
80

81     /**
82      * Constant string (value "solaris") indicating the platform is running on a
83      * Solaris-based operating system.
84      * @deprecated Replaced by {@link Platform#OS_SOLARIS}.
85      */

86     public static final String JavaDoc OS_SOLARIS = "solaris";//$NON-NLS-1$
87

88     /**
89      * Constant string (value "hpux") indicating the platform is running on an
90      * HP/UX-based operating system.
91      * @deprecated Replaced by {@link Platform#OS_HPUX}.
92      */

93     public static final String JavaDoc OS_HPUX = "hpux";//$NON-NLS-1$
94

95     /**
96      * Constant string (value "qnx") indicating the platform is running on a
97      * QNX-based operating system.
98      * @deprecated Replaced by {@link Platform#OS_QNX}.
99      */

100     public static final String JavaDoc OS_QNX = "qnx";//$NON-NLS-1$
101

102     /**
103      * Constant string (value "macosx") indicating the platform is running on a
104      * Mac OS X operating system.
105      * @since 2.0
106      * @deprecated Replaced by {@link Platform#OS_MACOSX}.
107      */

108     public static final String JavaDoc OS_MACOSX = "macosx";//$NON-NLS-1$
109

110     /**
111      * Constant string (value "unknown") indicating the platform is running on a
112      * machine running an unknown operating system.
113      * @deprecated Replaced by {@link Platform#OS_UNKNOWN}.
114      */

115     public static final String JavaDoc OS_UNKNOWN = "unknown";//$NON-NLS-1$
116

117     /**
118      * Constant string (value "x86") indicating the platform is running on an
119      * x86-based architecture.
120      * @deprecated Replaced by {@link Platform#ARCH_X86}.
121      */

122     public static final String JavaDoc ARCH_X86 = "x86";//$NON-NLS-1$
123

124     /**
125      * Constant string (value "PA_RISC") indicating the platform is running on an
126      * PA_RISC-based architecture.
127      * @deprecated Replaced by {@link Platform#ARCH_PA_RISC}.
128      */

129     public static final String JavaDoc ARCH_PA_RISC = "PA_RISC";//$NON-NLS-1$
130

131     /**
132      * Constant string (value "ppc") indicating the platform is running on an
133      * PowerPC-based architecture.
134      * @since 2.0
135      * @deprecated Replaced by {@link Platform#ARCH_PPC}.
136      */

137     public static final String JavaDoc ARCH_PPC = "ppc";//$NON-NLS-1$
138

139     /**
140      * Constant string (value "sparc") indicating the platform is running on an
141      * Sparc-based architecture.
142      * @since 2.0
143      * @deprecated Replaced by {@link Platform#ARCH_SPARC}.
144      */

145     public static final String JavaDoc ARCH_SPARC = "sparc";//$NON-NLS-1$
146

147     /**
148      * Constant string (value "win32") indicating the platform is running on a
149      * machine using the Windows windowing system.
150      * @deprecated Replaced by {@link Platform#WS_WIN32}.
151      */

152     public static final String JavaDoc WS_WIN32 = "win32";//$NON-NLS-1$
153

154     /**
155      * Constant string (value "motif") indicating the platform is running on a
156      * machine using the Motif windowing system.
157      * @deprecated Replaced by {@link Platform#WS_MOTIF}.
158      */

159     public static final String JavaDoc WS_MOTIF = "motif";//$NON-NLS-1$
160

161     /**
162      * Constant string (value "gtk") indicating the platform is running on a
163      * machine using the GTK windowing system.
164      * @deprecated Replaced by {@link Platform#WS_GTK}.
165      */

166     public static final String JavaDoc WS_GTK = "gtk";//$NON-NLS-1$
167

168     /**
169      * Constant string (value "photon") indicating the platform is running on a
170      * machine using the Photon windowing system.
171      * @deprecated Replaced by {@link Platform#WS_PHOTON}.
172      */

173     public static final String JavaDoc WS_PHOTON = "photon";//$NON-NLS-1$
174

175     /**
176      * Constant string (value "carbon") indicating the platform is running on a
177      * machine using the Carbon windowing system (Mac OS X).
178      * @since 2.0
179      * @deprecated Replaced by {@link Platform#WS_CARBON}.
180      */

181     public static final String JavaDoc WS_CARBON = "carbon";//$NON-NLS-1$
182

183     /**
184      * Constant string (value "unknown") indicating the platform is running on a
185      * machine running an unknown windowing system.
186      * @deprecated Replaced by {@link Platform#WS_UNKNOWN}.
187      */

188     public static final String JavaDoc WS_UNKNOWN = "unknown";//$NON-NLS-1$
189

190     /**
191      * Private constructor to block instance creation.
192      */

193     private BootLoader() {
194         // not allowed
195
}
196
197     /**
198      * Returns the command line args provided to the platform when it was first run.
199      * Note that individual platform runnables may be provided with different arguments
200      * if they are being run individually rather than with <code>Platform.run()</code>.
201      *
202      * @return the command line used to start the platform
203      * @deprecated Replaced by {@link Platform#getCommandLineArgs()}.
204      */

205     public static String JavaDoc[] getCommandLineArgs() {
206         return InternalPlatform.getDefault().getApplicationArgs();
207     }
208
209     /**
210      * Returns the current platform configuration.
211      *
212      * @return platform configuration used in current instance of platform
213      * @since 2.0
214      * @deprecated This functionality has moved to the Eclipse Update manager plug-in.
215      */

216     public static org.eclipse.core.boot.IPlatformConfiguration getCurrentPlatformConfiguration() {
217         BundleContext context = InternalPlatform.getDefault().getBundleContext();
218         // acquire factory service first
219
ServiceReference configFactorySR = context.getServiceReference(IPlatformConfigurationFactory.class.getName());
220         if (configFactorySR == null)
221             throw new IllegalStateException JavaDoc();
222         IPlatformConfigurationFactory configFactory = (IPlatformConfigurationFactory) context.getService(configFactorySR);
223         if (configFactory == null)
224             throw new IllegalStateException JavaDoc();
225         // get the configuration using the factory
226
IPlatformConfiguration currentConfig = configFactory.getCurrentPlatformConfiguration();
227         context.ungetService(configFactorySR);
228         return new PlatformConfiguration(currentConfig);
229     }
230
231     /**
232      * Returns URL at which the Platform runtime executables and libraries are installed.
233      * The returned value is distinct from the location of any given platform's data.
234      *
235      * @return the URL indicating where the platform runtime is installed.
236      * @deprecated Use <code>Platform.getInstallLocation().getURL()</code>
237      */

238     public static URL JavaDoc getInstallURL() {
239         return InternalPlatform.getDefault().getInstallURL();
240     }
241
242     /**
243      * Returns the string name of the current locale for use in finding files
244      * whose path starts with <code>$nl$</code>.
245      *
246      * @return the string name of the current locale
247      * @deprecated Replaced by {@link Platform#getNL()}.
248      */

249     public static String JavaDoc getNL() {
250         return InternalPlatform.getDefault().getNL();
251     }
252
253     /**
254      * Returns the string name of the current operating system for use in finding
255      * files whose path starts with <code>$os$</code>. <code>OS_UNKNOWN</code> is
256      * returned if the operating system cannot be determined.
257      * The value may indicate one of the operating systems known to the platform
258      * (as specified in <code>knownOSValues</code>) or a user-defined string if
259      * the operating system name is specified on the command line.
260      *
261      * @return the string name of the current operating system
262      * @see #knownOSValues
263      * @deprecated Replaced by {@link Platform#getOS()}.
264      */

265     public static String JavaDoc getOS() {
266         return InternalPlatform.getDefault().getOS();
267     }
268
269     /**
270      * Returns the string name of the current system architecture.
271      * The value is a user-defined string if the architecture is
272      * specified on the command line, otherwise it is the value
273      * returned by <code>java.lang.System.getProperty("os.arch")</code>.
274      *
275      * @return the string name of the current system architecture
276      * @since 2.0
277      * @deprecated Replaced by {@link Platform#getOSArch()}.
278      */

279     public static String JavaDoc getOSArch() {
280         return InternalPlatform.getDefault().getOSArch();
281     }
282
283     /**
284      * Returns a platform configuration object, optionally initialized with previously saved
285      * configuration information.
286      *
287      * @param url location of previously save configuration information. If <code>null</code>
288      * is specified, an empty configuration object is returned
289      * @return platform configuration used in current instance of platform
290      * @exception IOException if the configuration cannot be read
291      * @since 2.0
292      * @deprecated This functionality has moved to the Eclipse Update manager plug-in.
293      */

294     public static org.eclipse.core.boot.IPlatformConfiguration getPlatformConfiguration(URL JavaDoc url) throws IOException JavaDoc {
295         BundleContext context = InternalPlatform.getDefault().getBundleContext();
296         // acquire factory service first
297
ServiceReference configFactorySR = context.getServiceReference(IPlatformConfigurationFactory.class.getName());
298         if (configFactorySR == null)
299             throw new IllegalStateException JavaDoc();
300         IPlatformConfigurationFactory configFactory = (IPlatformConfigurationFactory) context.getService(configFactorySR);
301         if (configFactory == null)
302             throw new IllegalStateException JavaDoc();
303         // get the configuration using the factory
304
IPlatformConfiguration config = configFactory.getPlatformConfiguration(url);
305         context.ungetService(configFactorySR);
306         return new PlatformConfiguration(config);
307     }
308
309     /**
310      * Returns the string name of the current window system for use in finding files
311      * whose path starts with <code>$ws$</code>. <code>null</code> is returned
312      * if the window system cannot be determined.
313      *
314      * @return the string name of the current window system or <code>null</code>
315      * @deprecated Replaced by {@link Platform#getWS()}.
316      */

317     public static String JavaDoc getWS() {
318         return InternalPlatform.getDefault().getWS();
319     }
320
321     /**
322      * Returns a list of known system architectures.
323      * <p>
324      * Note that this list is not authoritative; there may be legal values
325      * not included in this list. Indeed, the value returned by
326      * <code>getOSArch</code> may not be in this list. Also, this list may
327      * change over time as Eclipse comes to run on more operating environments.
328      * </p>
329      *
330      * @return the list of system architectures known to the system
331      * @see #getOSArch()
332      * @since 2.0
333      * @deprecated Replaced by {@link Platform#knownOSArchValues()}.
334      */

335     public static String JavaDoc[] knownOSArchValues() {
336         return Platform.knownOSArchValues();
337     }
338
339     /**
340      * Returns a list of known operating system names.
341      * <p>
342      * Note that this list is not authoritative; there may be legal values
343      * not included in this list. Indeed, the value returned by
344      * <code>getOS</code> may not be in this list. Also, this list may
345      * change over time as Eclipse comes to run on more operating environments.
346      * </p>
347      *
348      * @return the list of operating systems known to the system
349      * @see #getOS()
350      * @since 2.0
351      * @deprecated Replaced by {@link Platform#knownOSValues()}.
352      */

353     public static String JavaDoc[] knownOSValues() {
354         return Platform.knownOSValues();
355     }
356
357     /**
358      * Returns a list of known windowing system names.
359      * <p>
360      * Note that this list is not authoritative; there may be legal values
361      * not included in this list. Indeed, the value returned by
362      * <code>getWS</code> may not be in this list. Also, this list may
363      * change over time as Eclipse comes to run on more operating environments.
364      * </p>
365      *
366      * @return the list of window systems known to the system
367      * @see #getWS()
368      * @since 2.0
369      * @deprecated Replaced by {@link Platform#knownWSValues()}.
370      */

371     public static String JavaDoc[] knownWSValues() {
372         return Platform.knownWSValues();
373     }
374
375     /**
376      * Returns <code>true</code> if the platform is currently running in
377      * debug mode. The platform is run
378      * in debug mode using the "-debug" command line argument.
379      *
380      * @return whether or not the platform is running in debug mode
381      * @deprecated Replaced by {@link Platform#inDebugMode()}.
382      */

383     public static boolean inDebugMode() {
384         return Platform.inDebugMode();
385     }
386
387     /**
388      * Returns <code>true</code> if the platform is currently running in
389      * development mode. That is, if special procedures are to be
390      * taken when defining plug-in class paths. The platform is run
391      * in development mode using the "-dev" command line argument.
392      *
393      * @return whether or not the platform is running in development mode
394      * @deprecated Replaced by {@link Platform#inDevelopmentMode()}.
395      */

396     public static boolean inDevelopmentMode() {
397         return Platform.inDevelopmentMode();
398     }
399
400     /**
401      * Returns whether the platform is running.
402      *
403      * @return <code>true</code> if the platform is running,
404      * and <code>false</code> otherwise
405      * @deprecated Replaced by {@link Platform#isRunning()}.
406      */

407     public static boolean isRunning() {
408         return InternalPlatform.getDefault().isRunning();
409     }
410
411     /**
412      * Returns the complete plugin path defined by the file at the given location.
413      * If the given location is <code>null</code> or does not indicate a valid
414      * plug-in path definition file, <code>null</code> is returned.
415      *
416      * @param pluginPathLocation the location of the plug-in path to load
417      * @return the complete set of URLs which locate plug-ins
418      * @deprecated This functionality has moved to the Eclipse Update manager plug-in.
419      */

420     public static URL JavaDoc[] getPluginPath(URL JavaDoc pluginPathLocation) {
421         return InternalPlatform.getDefault().getPluginPath(pluginPathLocation);
422     }
423
424     /**
425      * Returns whether the given location (typically a directory in the
426      * local file system) contains the saved data for a platform. The
427      * saved data for the platform is recognizable by the presence of
428      * a special platform metadata subdirectory; however, this metadata
429      * directory is not usually created unless there is some reason to do so
430      * (for example, so that an active plug-in can save its state).
431      *
432      * @return <code>true</code> if the location contains the
433      * saved data for a platform, and <code>false</code> otherwise
434      * @deprecated In Eclipse 3.0 this method is no longer supported.
435      * The implementation always returns <code>true</code>.
436      */

437     public static boolean containsSavedPlatform(String JavaDoc location) {
438         return true;
439     }
440
441     /**
442      * Instantiates and returns an instance of the named application's
443      * runnable entry point.
444      * <code>null</code> is returned if the runnable cannot be found.
445      *
446      * @param applicationName the fully qualified name of an
447      * extension installed in the platform's <code>applications</code>
448      * extension point (i.e., <code>org.eclipse.core.applications</code>).
449      * @return a platform runnable
450      * @exception Exception if there is a problem instantiating the specified runnable
451      * @deprecated In Eclipse 3.0 this method is no longer supported.
452      * The implementation always returns <code>null</code>. See the related but
453      * non-API methods on <code>org.eclipse.core.runtime.adaptor.EclipseStarter</code>
454      * in the org.eclipse.osgi plug-in.
455      */

456     public static IPlatformRunnable getRunnable(String JavaDoc applicationName) throws Exception JavaDoc {
457         return null;
458     }
459     /**
460      * Instantiates and returns an instance of the named class. The class
461      * must implement <code>IPlatformRunnable</code>.
462      * If the class implements <code>IExecutableExtension</code>, the created
463      * instance is initialized with the given arguments.
464      * <code>null</code> is returned if the runnable cannot be found.
465      *
466      * @param pluginId the unique identifier of the plug-in containing the given class
467      * @param className the fully qualified name of the class to instantiate
468      * @param args the initialization arguments passed to the new instance
469      * @return a platform runnable, or <code>null</code> if the runnable cannot
470      * be found
471      * @exception Exception if there is a problem instantiating the specified runnable
472      * @deprecated In Eclipse 3.0 this method is no longer supported.
473      * The implementation always returns <code>null</code>. See the related but
474      * non-API methods on <code>org.eclipse.core.runtime.adaptor.EclipseStarter</code>
475      * in the org.eclipse.osgi plug-in.
476      */

477     public static IPlatformRunnable getRunnable(String JavaDoc pluginId, String JavaDoc className, Object JavaDoc args) throws Exception JavaDoc {
478         return null;
479     }
480
481     /**
482      * Launches the Platform to run a single application.
483      * This convenince method starts up the Platform,
484      * runs the indicated application, and then shuts down
485      * the Platform. The Platform must not be running already.
486      *
487      * @param applicationName The fully qualified name of an
488      * extension installed in the Platform plug-in's <code>applications</code>
489      * extension-point (i.e., <code>org.eclipse.core.runtime.applications</code>).
490      * @param pluginPathLocation the URL of the plug-in path; this is where
491      * the Platform is to find the code for plug-ins
492      * @param location the location (usually a string path in the local file
493      * file system) for the saved platform state
494      * @param args the array of command-line style argments which are passed
495      * to the Platform on initialization. The arguments which are consumed by the
496      * Platform's initialization are removed from the arg list. This modified arg list is
497      * the return value of this method.
498      *@return the list of <code>args</code> which were supplied but not consumed
499      * by this method.
500      * @return the result, or <code>null</code> if none
501      * @exception Exception if anything goes wrong
502      * @see #startup
503      * @deprecated In Eclipse 3.0 this method is no longer supported.
504      * The implementation always returns <code>null</code>. See the related but
505      * non-API methods on <code>org.eclipse.core.runtime.adaptor.EclipseStarter</code>
506      * in the org.eclipse.osgi plug-in.
507      */

508     public static Object JavaDoc run(String JavaDoc applicationName, URL JavaDoc pluginPathLocation, String JavaDoc location, String JavaDoc[] args) throws Exception JavaDoc {
509         return null;
510     }
511     /**
512      * Launches the Platform to run a single application.
513      * This convenince method starts up the Platform,
514      * runs the indicated application, and then shuts down
515      * the Platform. The Platform must not be running already.
516      *
517      * @param applicationName The fully qualified name of an
518      * extension installed in the Platform plug-in's <code>applications</code>
519      * extension-point (i.e., <code>org.eclipse.core.runtime.applications</code>).
520      * @param pluginPathLocation the URL of the plug-in path; this is where
521      * the Platform is to find the code for plug-ins
522      * @param location the location (usually a string path in the local file
523      * file system) for the saved platform state
524      * @param args the array of command-line style argments which are passed
525      * to the Platform on initialization. The arguments which are consumed by the
526      * Platform's initialization are removed from the arg list. This modified arg list is
527      * the return value of this method.
528      * @param handler an optional handler invoked by the launched application
529      * at the point the application considers itself initialized. A typical
530      * use for the handler would be to take down any splash screen
531      * that was displayed by the caller of this method.
532      *@return the list of <code>args</code> which were supplied but not consumed
533      * by this method.
534      * @return the result, or <code>null</code> if none
535      * @exception Exception if anything goes wrong
536      * @see #startup
537      * @deprecated In Eclipse 3.0 this method is no longer supported.
538      * The implementation always returns <code>null</code>. See the related but
539      * non-API methods on <code>org.eclipse.core.runtime.adaptor.EclipseStarter</code>
540      * in the org.eclipse.osgi plug-in.
541      */

542     public static Object JavaDoc run(String JavaDoc applicationName, URL JavaDoc pluginPathLocation, String JavaDoc location, String JavaDoc[] args, Runnable JavaDoc handler) throws Exception JavaDoc {
543         return null;
544     }
545     /**
546      * Shuts down the Platform. The Platform must be running. In the process,
547      * each active plug-in is told to shutdown via <code>Plugin.shutdown</code>.
548      * <p>
549      * Note that the state of the Platform is not automatically saved
550      * before shutting down.
551      * </p>
552      * <p>
553      * On return, the Platform will no longer be running (but could
554      * be re-launched with another call to <code>startup</code>).
555      * Any objects handed out by running Platform, including
556      * Platform runnables obtained via <code>getRunnable</code>,
557      * will be permanently invalid. The effects of attempting to invoke
558      * methods on invalid objects is undefined.
559      * </p>
560      * @exception Exception if there were problems shutting down
561      * @deprecated In Eclipse 3.0 this method is no longer supported.
562      * The implementation does nothing. See the related but
563      * non-API methods on <code>org.eclipse.core.runtime.adaptor.EclipseStarter</code>
564      * in the org.eclipse.osgi plug-in.
565      */

566     public static void shutdown() throws Exception JavaDoc {
567     }
568     /**
569      * Launches the Eclipse Platform. The Platform must not be running.
570      * <p>
571      * The location of the started Platform is defined as follows:
572      * <ul>
573      * <li>If the <code>location</code> argument is specified, that value is used.
574      * <li>If <code>location</code> is <code>null</code> but <code>args</code>
575      * contains a <code>-data&ltlocation&gt</code> pair, then the given value is used.
576      * <li> If neither is specified, <code>System.getProperty("user.dir")</code> is used.
577      * </ul>
578      * The plug-in path of the started Platform is defined as follows:
579      * <ul>
580      * <li>If the <code>pluginPathLocation</code> argument is specified, that value is tried.
581      * <li>If <code>pluginPathLocation</code> is <code>null</code> but <code>args</code>
582      * contains a <code>-plugins &ltlocation&gt</code> pair, then the given value is tried.
583      * <li>If neither value is specified or a given location does not exist,
584      * the Platform's location is searched.
585      * <li>Finally, the default plug-in path is used. This value identifies the plug-ins in the
586      * Platform's install location.
587      * </ul>
588      * @param pluginPathLocation the URL of the plug-in path; this is where
589      * the Platform is to find the code for plug-ins
590      * @param location the location (usually a string path in the local file
591      * file system) for the saved Platform state
592      * @param args the array of command-line style argments which are passed
593      * to the platform on initialization. The arguments which are consumed by the
594      * Platform's initialization are removed from the arg list. This modified arg list is
595      * the return value of this method.
596      * @return the list of <code>args</code> which were supplied but not consumed
597      * by this method.
598      * @exception Exception if there are problems starting the platform
599      * @deprecated In Eclipse 3.0 this method is no longer supported.
600      * The implementation always returns <code>null</code>. See the related but
601      * non-API methods on <code>org.eclipse.core.runtime.adaptor.EclipseStarter</code>
602      * in the org.eclipse.osgi plug-in.
603      */

604     public static String JavaDoc[] startup(URL JavaDoc pluginPathLocation, String JavaDoc location, String JavaDoc[] args) throws Exception JavaDoc {
605         return null;
606     }
607     /**
608      * Launches the Eclipse Platform. The Platform must not be running.
609      * <p>
610      * The location of the started Platform is defined as follows:
611      * <ul>
612      * <li>If the <code>location</code> argument is specified, that value is used.
613      * <li>If <code>location</code> is <code>null</code> but <code>args</code>
614      * contains a <code>-data &ltlocation&gt</code> pair, then the given value is used.
615      * <li> If neither is specified, <code>System.getProperty("user.dir")</code> is used.
616      * </ul>
617      * The plug-in path of the started Platform is defined as follows:
618      * <ul>
619      * <li>If the <code>pluginPathLocation</code> argument is specified, that value is tried.
620      * <li>If <code>pluginPathLocation</code> is <code>null</code> but <code>args</code>
621      * contains a <code>-plugins &ltlocation&gt</code> pair, then the given value is tried.
622      * <li>If neither value is specified or a given location does not exist,
623      * the Platform's location is searched.
624      * <li>Finally, the default plug-in path is used. This value identifies the plug-ins in the
625      * Platform's install location.
626      * </ul>
627      * @param pluginPathLocation the URL of the plug-in path; this is where
628      * the Platform is to find the code for plug-ins
629      * @param location the location (usually a string path in the local file
630      * file system) for the saved Platform state
631      * @param args the array of command-line style argments which are passed
632      * to the platform on initialization. The arguments which are consumed by the
633      * Platform's initialization are removed from the arg list. This modified arg list is
634      * the return value of this method.
635      * @param handler an optional handler invoked by the launched application
636      * at the point the application considers itself initialized. A typical
637      * use for the handler would be to take down any splash screen
638      * that was displayed by the caller of this method.
639      * @return the list of <code>args</code> which were supplied but not consumed
640      * by this method.
641      * @exception Exception if there are problems starting the platform
642      * @deprecated In Eclipse 3.0 this method is no longer supported.
643      * The implementation always returns <code>null</code>. See the related but
644      * non-API methods on <code>org.eclipse.core.runtime.adaptor.EclipseStarter</code>
645      * in the org.eclipse.osgi plug-in.
646      */

647     public static String JavaDoc[] startup(URL JavaDoc pluginPathLocation, String JavaDoc location, String JavaDoc[] args, Runnable JavaDoc handler) throws Exception JavaDoc {
648         return null;
649     }
650
651 }
652
Popular Tags