public class EclipseEnvironmentInfo extends Object implements EnvironmentInfo
Modifier and Type | Method and Description |
---|---|
String[] |
getCommandLineArgs()
Returns all command line arguments specified when the running framework was started.
|
static EclipseEnvironmentInfo |
getDefault() |
String[] |
getFrameworkArgs()
Returns the arguments consumed by the framework implementation itself.
|
String |
getNL()
Returns the string name of the current locale for use in finding files
whose path starts with
$nl$ . |
String[] |
getNonFrameworkArgs()
Returns the arguments not consumed by the framework implementation itself.
|
String |
getOS()
Returns the string name of the current operating system for use in finding
files whose path starts with
$os$ . |
String |
getOSArch()
Returns the string name of the current system architecture.
|
String |
getProperty(String key)
Returns the value for the specified property.
|
String |
getWS()
Returns the string name of the current window system for use in finding files
whose path starts with
$ws$ . |
static String |
guessOS(String osName) |
static String |
guessWS(String osName) |
boolean |
inDebugMode()
Returns
true if the framework is in debug mode and
false otherwise. |
boolean |
inDevelopmentMode()
Returns
true if the framework is in development mode
and false otherwise. |
static void |
setAllArgs(String[] allArgs) |
static void |
setAppArgs(String[] appArgs) |
static void |
setFrameworkArgs(String[] frameworkArgs) |
String |
setProperty(String key,
String value)
Sets the value for the specified property.
|
public static EclipseEnvironmentInfo getDefault()
public boolean inDevelopmentMode()
EnvironmentInfo
true
if the framework is in development mode
and false
otherwise.inDevelopmentMode
in interface EnvironmentInfo
public boolean inDebugMode()
EnvironmentInfo
true
if the framework is in debug mode and
false
otherwise.inDebugMode
in interface EnvironmentInfo
public String[] getCommandLineArgs()
EnvironmentInfo
getCommandLineArgs
in interface EnvironmentInfo
public String[] getFrameworkArgs()
EnvironmentInfo
getFrameworkArgs
in interface EnvironmentInfo
public String[] getNonFrameworkArgs()
EnvironmentInfo
getNonFrameworkArgs
in interface EnvironmentInfo
public String getOSArch()
EnvironmentInfo
java.lang.System.getProperty("os.arch")
.getOSArch
in interface EnvironmentInfo
public String getNL()
EnvironmentInfo
$nl$
.getNL
in interface EnvironmentInfo
public String getOS()
EnvironmentInfo
$os$
. Return Constants.OS_UNKNOWN
if the operating system cannot be determined.
The value may indicate one of the operating systems known to the platform
(as specified in org.eclipse.core.runtime.Platform#knownOSValues
)
or a user-defined string if the operating system name is specified on the command line.
getOS
in interface EnvironmentInfo
public String getWS()
EnvironmentInfo
$ws$
. Return null
if the window system cannot be determined.getWS
in interface EnvironmentInfo
null
public static void setAllArgs(String[] allArgs)
public static void setAppArgs(String[] appArgs)
public static void setFrameworkArgs(String[] frameworkArgs)
public String getProperty(String key)
EnvironmentInfo
osgi.framework.useSystemProperties
is used then
the environment properties are specific for each instance of the framework.
This method should be used instead of the System.getProperty(String)
method to avoid the global nature of system properties.
getProperty
in interface EnvironmentInfo
key
- the property keypublic String setProperty(String key, String value)
EnvironmentInfo
osgi.framework.useSystemProperties
is used then
the environment properties are specific for each instance of the framework.
This method should be used instead of the System.setProperty(String, String)
method to avoid the global nature of system properties.
setProperty
in interface EnvironmentInfo
key
- the property keyvalue
- the value of the propertyCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.