|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openoffice.ide.eclipse.core.model.utils.SystemHelper
public class SystemHelper
Helper class for system variables handling.
Field Summary | |
---|---|
static java.lang.String |
PATH_SEPARATOR
|
Constructor Summary | |
---|---|
SystemHelper()
|
Method Summary | |
---|---|
static java.lang.String[] |
addEnv(java.lang.String[] pEnv,
java.lang.String pName,
java.lang.String pValue,
java.lang.String pSeparator)
Add an environment variable to an array of existing variables. |
static java.lang.String[] |
addPathEnv(java.lang.String[] pEnv,
java.lang.String pName,
java.lang.String[] pValue)
Add an environment variable to an array of existing variables. |
static java.io.File |
getFile(org.eclipse.core.resources.IResource pRes)
Get a normal Java File from an Eclipse IResource. |
static java.io.File |
getFile(IUnoidlProject pPrj)
Get a normal Java File from an IUnoidlProject . |
static java.lang.String[] |
getSystemEnvironement()
|
static java.lang.Process |
runTool(java.lang.String pShellCommand,
java.lang.String[] pEnv,
java.io.File pExecDir)
Run a shell command with a given environment and an optional execution directory. |
static java.lang.Process |
runToolWithSysEnv(java.lang.String pShellCommand,
java.io.File pExecDir)
Run a shell command with the system environment and an optional execution directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PATH_SEPARATOR
Constructor Detail |
---|
public SystemHelper()
Method Detail |
---|
public static java.io.File getFile(org.eclipse.core.resources.IResource pRes)
pRes
- the IResource to convert
public static java.io.File getFile(IUnoidlProject pPrj)
IUnoidlProject
.
pPrj
- IUnoidlProject
to convert
public static java.lang.String[] addPathEnv(java.lang.String[] pEnv, java.lang.String pName, java.lang.String[] pValue)
pEnv
- the array of existing environment variables where to add the
new variablepName
- the name of the variable to addpValue
- the value of the variable to add
public static java.lang.String[] addEnv(java.lang.String[] pEnv, java.lang.String pName, java.lang.String pValue, java.lang.String pSeparator)
pEnv
- the array of existing environment variables where to add the
new variablepName
- the name of the variable to addpValue
- the value of the variable to addpSeparator
- the separator to use if there is already a variable with
the same name. If null
, the old variable will be replaced
public static java.lang.String[] getSystemEnvironement()
public static java.lang.Process runToolWithSysEnv(java.lang.String pShellCommand, java.io.File pExecDir) throws java.io.IOException
pShellCommand
- the command to runpExecDir
- the execution directory or null
if none
java.io.IOException
- if anything wrong happens during the command launchpublic static java.lang.Process runTool(java.lang.String pShellCommand, java.lang.String[] pEnv, java.io.File pExecDir) throws java.io.IOException
pShellCommand
- the command to runpEnv
- the environment variablespExecDir
- the execution directory or null
if none
java.io.IOException
- if anything wrong happens during the command launch
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |