|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.core.boot.BootLoader
Special boot loader class for the Eclipse Platform. This class cannot be instantiated; all functionality is provided by static methods.
The Eclipse Platform makes heavy use of Java class loaders for
loading plug-ins. Even the Platform Core Runtime itself, including
the Platform
class, needs to be loaded by a special
class loader. The upshot is that a client program (such as a Java main
program, a servlet) cannot directly reference even the
Platform
class. Instead, a client must use this
loader class for initializing the platform, invoking functionality
defined in plug-ins, and shutting down the platform when done.
Platform
Field Summary | |
static String |
ARCH_PA_RISC
Constant string (value "PA_RISC") indicating the platform is running on an PA_RISC-based architecture. |
static String |
ARCH_PPC
Constant string (value "ppc") indicating the platform is running on an PowerPC-based architecture. |
static String |
ARCH_SPARC
Constant string (value "sparc") indicating the platform is running on an Sparc-based architecture. |
static String |
ARCH_X86
Constant string (value "x86") indicating the platform is running on an x86-based architecture. |
static String |
OS_AIX
Constant string (value "aix") indicating the platform is running on an AIX-based operating system. |
static String |
OS_HPUX
Constant string (value "hpux") indicating the platform is running on an HP/UX-based operating system. |
static String |
OS_LINUX
Constant string (value "linux") indicating the platform is running on a Linux-based operating system. |
static String |
OS_MACOSX
Constant string (value "macosx") indicating the platform is running on a Mac OS X operating system. |
static String |
OS_QNX
Constant string (value "qnx") indicating the platform is running on a QNX-based operating system. |
static String |
OS_SOLARIS
Constant string (value "solaris") indicating the platform is running on a Solaris-based operating system. |
static String |
OS_UNKNOWN
Constant string (value "unknown") indicating the platform is running on a machine running an unknown operating system. |
static String |
OS_WIN32
Constant string (value "win32") indicating the platform is running on a Window 32-bit operating system (e.g., Windows 98, NT, 2000). |
static String |
PI_BOOT
The unique identifier constant (value " org.eclipse.core.boot ")
of the Core Boot (pseudo-) plug-in. |
static String |
WS_CARBON
Constant string (value "carbon") indicating the platform is running on a machine using the Carbon windowing system (Mac OS X). |
static String |
WS_GTK
Constant string (value "gtk") indicating the platform is running on a machine using the GTK windowing system. |
static String |
WS_MOTIF
Constant string (value "motif") indicating the platform is running on a machine using the Motif windowing system. |
static String |
WS_PHOTON
Constant string (value "photon") indicating the platform is running on a machine using the Photon windowing system. |
static String |
WS_UNKNOWN
Constant string (value "unknown") indicating the platform is running on a machine running an unknown windowing system. |
static String |
WS_WIN32
Constant string (value "win32") indicating the platform is running on a machine using the Windows windowing system. |
Method Summary | |
static boolean |
containsSavedPlatform(String location)
Returns whether the given location (typically a directory in the local file system) contains the saved data for a platform. |
static String[] |
getCommandLineArgs()
Returns the command line args provided to the platform when it was first run. |
static IPlatformConfiguration |
getCurrentPlatformConfiguration()
Returns the current platform configuration. |
static URL |
getInstallURL()
Returns URL at which the Platform runtime executables and libraries are installed. |
static String |
getNL()
Returns the string name of the current locale for use in finding files whose path starts with $nl$ . |
static String |
getOS()
Returns the string name of the current operating system for use in finding files whose path starts with $os$ . |
static String |
getOSArch()
Returns the string name of the current system architecture. |
static IPlatformConfiguration |
getPlatformConfiguration(URL url)
Returns a platform configuration object, optionally initialized with previously saved configuration information. |
static URL[] |
getPluginPath(URL pluginPathLocation)
Returns the complete plugin path defined by the file at the given location. |
static IPlatformRunnable |
getRunnable(String applicationName)
Instantiates and returns an instance of the named application's runnable entry point. |
static IPlatformRunnable |
getRunnable(String pluginId,
String className,
Object args)
Instantiates and returns an instance of the named class. |
static String |
getWS()
Returns the string name of the current window system for use in finding files whose path starts with $ws$ . |
static boolean |
inDebugMode()
Returns true if the platform is currently running in
debug mode. |
static boolean |
inDevelopmentMode()
Returns true if the platform is currently running in
development mode. |
static boolean |
isRunning()
Returns whether the platform is running. |
static String[] |
knownOSArchValues()
Returns a list of known system architectures. |
static String[] |
knownOSValues()
Returns a list of known operating system names. |
static String[] |
knownWSValues()
Returns a list of known windowing system names. |
static Object |
run(String applicationName,
URL pluginPathLocation,
String location,
String[] args)
Launches the Platform to run a single application. |
static Object |
run(String applicationName,
URL pluginPathLocation,
String location,
String[] args,
Runnable handler)
Launches the Platform to run a single application. |
static void |
shutdown()
Shuts down the Platform. |
static String[] |
startup(URL pluginPathLocation,
String location,
String[] args)
Launches the Eclipse Platform. |
static String[] |
startup(URL pluginPathLocation,
String location,
String[] args,
Runnable handler)
Launches the Eclipse Platform. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String PI_BOOT
org.eclipse.core.boot
")
of the Core Boot (pseudo-) plug-in.
public static final String OS_WIN32
public static final String OS_LINUX
public static final String OS_AIX
public static final String OS_SOLARIS
public static final String OS_HPUX
public static final String OS_QNX
public static final String OS_MACOSX
public static final String OS_UNKNOWN
public static final String ARCH_X86
public static final String ARCH_PA_RISC
public static final String ARCH_PPC
public static final String ARCH_SPARC
public static final String WS_WIN32
public static final String WS_MOTIF
public static final String WS_GTK
public static final String WS_PHOTON
public static final String WS_CARBON
public static final String WS_UNKNOWN
Method Detail |
public static boolean containsSavedPlatform(String location)
true
if the location contains the
saved data for a platform, and false
otherwisepublic static String[] getCommandLineArgs()
Platform.run()
.
public static IPlatformConfiguration getCurrentPlatformConfiguration()
public static URL getInstallURL()
public static String getNL()
$nl$
. null
is returned
if the locale cannot be determined.
null
public static String getOS()
$os$
. OS_UNKNOWN
is
returned if the operating system cannot be determined.
The value may indicate one of the operating systems known to the platform
(as specified in knownOSValues
) or a user-defined string if
the operating system name is specified on the command line.
knownOSValues()
public static String getOSArch()
java.lang.System.getProperty("os.arch")
.
public static IPlatformConfiguration getPlatformConfiguration(URL url) throws IOException
url
- location of previously save configuration information. If null
is specified, an empty configuration object is returned
IOException
public static URL[] getPluginPath(URL pluginPathLocation)
null
or does not indicate a valid
plug-in path definition file, null
is returned.
public static IPlatformRunnable getRunnable(String applicationName) throws Exception
null
is returned if the runnable cannot be found.
applicationName
- the fully qualified name of an
extension installed in the platform's applications
extension point (i.e., org.eclipse.core.applications
).
Exception
- if there is a problem instantiating the specified runnablepublic static IPlatformRunnable getRunnable(String pluginId, String className, Object args) throws Exception
IPlatformRunnable
.
If the class implements IExecutableExtension
, the created
instance is initialized with the given arguments.
null
is returned if the runnable cannot be found.
pluginId
- the unique identifier of the plug-in containing the given classclassName
- the fully qualified name of the class to instantiateargs
- the initialization arguments passed to the new instance
null
if the runnable cannot
be found
Exception
- if there is a problem instantiating the specified runnablepublic static String getWS()
$ws$
. null
is returned
if the window system cannot be determined.
null
public static String[] knownOSArchValues()
Note that this list is not authoritative; there may be legal values
not included in this list. Indeed, the value returned by
getOSArch
may not be in this list. Also, this list may
change over time as Eclipse comes to run on more operating environments.
getOSArch()
public static String[] knownOSValues()
Note that this list is not authoritative; there may be legal values
not included in this list. Indeed, the value returned by
getOS
may not be in this list. Also, this list may
change over time as Eclipse comes to run on more operating environments.
getOS()
public static String[] knownWSValues()
Note that this list is not authoritative; there may be legal values
not included in this list. Indeed, the value returned by
getWS
may not be in this list. Also, this list may
change over time as Eclipse comes to run on more operating environments.
getWS()
public static boolean inDebugMode()
true
if the platform is currently running in
debug mode. The platform is run
in debug mode using the "-debug" command line argument.
public static boolean inDevelopmentMode()
true
if the platform is currently running in
development mode. That is, if special procedures are to be
taken when defining plug-in class paths. The platform is run
in development mode using the "-dev" command line argument.
public static boolean isRunning()
startup
method starts the platform running;
the shutdown
method stops it.
true
if the platform is running,
and false
otherwisestartup(java.net.URL, java.lang.String, java.lang.String[])
,
shutdown()
public static Object run(String applicationName, URL pluginPathLocation, String location, String[] args) throws Exception
applicationName
- The fully qualified name of an
extension installed in the Platform plug-in's applications
extension-point (i.e., org.eclipse.core.runtime.applications
).pluginPathLocation
- the URL of the plug-in path; this is where
the Platform is to find the code for plug-inslocation
- the location (usually a string path in the local file
file system) for the saved platform stateargs
- the array of command-line style argments which are passed
to the Platform on initialization. The arguments which are consumed by the
Platform's initialization are removed from the arg list. This modified arg list is
the return value of this method.
args
which were supplied but not consumed
by this method.
Exception
- if anything goes wrongstartup(java.net.URL, java.lang.String, java.lang.String[])
public static Object run(String applicationName, URL pluginPathLocation, String location, String[] args, Runnable handler) throws Exception
applicationName
- The fully qualified name of an
extension installed in the Platform plug-in's applications
extension-point (i.e., org.eclipse.core.runtime.applications
).pluginPathLocation
- the URL of the plug-in path; this is where
the Platform is to find the code for plug-inslocation
- the location (usually a string path in the local file
file system) for the saved platform stateargs
- the array of command-line style argments which are passed
to the Platform on initialization. The arguments which are consumed by the
Platform's initialization are removed from the arg list. This modified arg list is
the return value of this method.handler
- an optional handler invoked by the launched application
at the point the application considers itself initialized. A typical
use for the handler would be to take down any splash screen
that was displayed by the caller of this method.
args
which were supplied but not consumed
by this method.
Exception
- if anything goes wrongstartup(java.net.URL, java.lang.String, java.lang.String[])
public static void shutdown() throws Exception
Plugin.shutdown
.
Note that the state of the Platform is not automatically saved before shutting down.
On return, the Platform will no longer be running (but could
be re-launched with another call to startup
).
Any objects handed out by running Platform, including
Platform runnables obtained via getRunnable
,
will be permanently invalid. The effects of attempting to invoke
methods on invalid objects is undefined.
Exception
- if there were problems shutting downpublic static String[] startup(URL pluginPathLocation, String location, String[] args) throws Exception
The location of the started Platform is defined as follows:
location
argument is specified, that value is used.
location
is null
but args
contains a -data<location>
pair, then the given value is used.
System.getProperty("user.dir")
is used.
pluginPathLocation
argument is specified, that value is tried.
pluginPathLocation
is null
but args
contains a -plugins <location>
pair, then the given value is tried.
pluginPathLocation
- the URL of the plug-in path; this is where
the Platform is to find the code for plug-inslocation
- the location (usually a string path in the local file
file system) for the saved Platform stateargs
- the array of command-line style argments which are passed
to the platform on initialization. The arguments which are consumed by the
Platform's initialization are removed from the arg list. This modified arg list is
the return value of this method.
args
which were supplied but not consumed
by this method.
Exception
- if there are problems starting the platformpublic static String[] startup(URL pluginPathLocation, String location, String[] args, Runnable handler) throws Exception
The location of the started Platform is defined as follows:
location
argument is specified, that value is used.
location
is null
but args
contains a -data <location>
pair, then the given value is used.
System.getProperty("user.dir")
is used.
pluginPathLocation
argument is specified, that value is tried.
pluginPathLocation
is null
but args
contains a -plugins <location>
pair, then the given value is tried.
pluginPathLocation
- the URL of the plug-in path; this is where
the Platform is to find the code for plug-inslocation
- the location (usually a string path in the local file
file system) for the saved Platform stateargs
- the array of command-line style argments which are passed
to the platform on initialization. The arguments which are consumed by the
Platform's initialization are removed from the arg list. This modified arg list is
the return value of this method.handler
- an optional handler invoked by the launched application
at the point the application considers itself initialized. A typical
use for the handler would be to take down any splash screen
that was displayed by the caller of this method.
args
which were supplied but not consumed
by this method.
Exception
- if there are problems starting the platform
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |