|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fife.rtext.plugins.tools.Tool
An "external tool."
| Constructor Summary | |
Tool()
Constructor. |
|
Tool(java.lang.String name,
java.lang.String desc)
Constructor. |
|
| Method Summary | |
void |
addArg(java.lang.String arg)
Adds a command line argument for this tool. |
java.lang.String |
checkForErrors()
Does basic checking to ensure that this program can run (the program exists, the directory to run in exists, etc.). |
void |
clearArgs()
Clears the command line arguments. |
void |
clearEnvVars()
Clears the environment variables associated with this tool. |
int |
compareTo(java.lang.Object o)
Compares this tool to another by name, lexicographically. |
boolean |
equals(java.lang.Object o)
Returns whether this tool and another have the same name. |
void |
execute(ProcessRunnerOutputListener l)
Runs this tool in a separate thread. |
java.lang.String |
getAccelerator()
Returns the accelerator to use to activate this tool in a menu. |
boolean |
getAppendEnvironmentVars()
Returns whether this tool should append any environment variables it defines to RText's current environment. |
java.lang.String[] |
getArgs()
Returns the command line arguments for this Tool, as an array. |
java.lang.String |
getDescription()
Returns a description of this tool. |
java.lang.String |
getDirectory()
Returns the directory the tool will run in. |
java.util.Map |
getEnvVars()
Returns a copy of the environment variable map for this tool. |
java.lang.String |
getName()
Returns the name of this tool. |
java.lang.String |
getProgram()
Returns the program to launch. |
int |
hashCode()
Returns the hash code of this tool. |
boolean |
kill()
Forcibly terminates this tool's external process, if it is running. |
static void |
main(java.lang.String[] args)
|
void |
putEnvVar(java.lang.String name,
java.lang.String value)
Sets an environment variable for this tool. |
void |
setAccelerator(java.lang.String accelerator)
Sets the accelerator to use to activate this tool in a menu. |
void |
setAppendEnvironmentVars(boolean append)
Sets whether this tool should append any environment variables it defines to RText's current environment. |
void |
setArgs(java.lang.String[] args)
Sets the command line arguments to this tool. |
void |
setDescription(java.lang.String desc)
Sets a description of this tool. |
void |
setDirectory(java.lang.String dir)
Sets the directory for this tool to run in. |
void |
setEnvVars(java.util.Map vars)
Sets the environment variables for this tool. |
void |
setName(java.lang.String name)
Sets the name of this tool. |
void |
setProgram(java.lang.String program)
Sets the program to launch. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Tool()
Tool(String, String)
constructor is preferred over this one.
public Tool(java.lang.String name,
java.lang.String desc)
name - The name of this tool.desc - A description of this tool. This may be null.| Method Detail |
public void addArg(java.lang.String arg)
arg - The argument. This cannot be null.clearArgs(),
setProgram(String)public java.lang.String checkForErrors()
null if the program
should be able to run.execute(ProcessRunnerOutputListener)public void clearArgs()
addArg(String)public void clearEnvVars()
putEnvVar(String, String)public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - The other tool.
public boolean equals(java.lang.Object o)
public void execute(ProcessRunnerOutputListener l)
l - Listens for events as this tool runs. This may be
null.checkForErrors()public java.lang.String getAccelerator()
null if there is none.setAccelerator(String)public boolean getAppendEnvironmentVars()
false, RText's environment is not
appended.setAppendEnvironmentVars(boolean)public java.lang.String[] getArgs()
setArgs(String[])public java.lang.String getDescription()
null if none
is defined.setDescription(String)public java.util.Map getEnvVars()
Map with both
keys and values as Strings.setEnvVars(Map)public java.lang.String getName()
setName(String)public java.lang.String getProgram()
setProgram(String)public java.lang.String getDirectory()
setDirectory(String)public int hashCode()
public boolean kill()
public void putEnvVar(java.lang.String name,
java.lang.String value)
name - The name of the environment variable.value - The value of the variable. If this is null,
then this variable will not be set with a special value.clearEnvVars()public void setAccelerator(java.lang.String accelerator)
accelerator - The accelerator to use, or null for
none.getAccelerator()public void setAppendEnvironmentVars(boolean append)
append - Whether to append the environment variables defined. If
this value is false, RText's environment is not
appended.getAppendEnvironmentVars()public void setArgs(java.lang.String[] args)
args - The new command line arguments.getArgs()public void setDescription(java.lang.String desc)
desc - A description of this tool. This may be null.getDescription()public void setDirectory(java.lang.String dir)
dir - The directory. This cannot be null.getDirectory()public void setEnvVars(java.util.Map vars)
vars - A String-to-String mapping of environment variables.getEnvVars()public void setName(java.lang.String name)
name - The name of this tool.getName()public void setProgram(java.lang.String program)
program - The program. This cannot be null.getProgram(),
addArg(String)public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||