|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.netbeans.modules.vcscore.cmdline.ExecuteCommand
Execute command.
| Field Summary | |
static String |
DEFAULT_REGEX
|
protected int |
exitStatus
|
static String |
STATUS_USE_REG_EXP_PARSE_OUTPUT
|
| Fields inherited from interface org.netbeans.modules.vcscore.commands.VcsCommandExecutor |
FAILED, INTERRUPTED, SUCCEEDED |
| Constructor Summary | |
ExecuteCommand(CommandExecutionContext executionContext,
UserCommand cmd,
Hashtable vars)
|
|
ExecuteCommand(CommandExecutionContext executionContext,
UserCommand cmd,
Hashtable vars,
String preferredExec)
|
|
| Method Summary | |
void |
addDataErrorOutputListener(CommandDataOutputListener l)
Deprecated. Kept for compatibility reasons only. Use addRegexErrorListener(org.netbeans.modules.vcscore.commands.RegexOutputListener) instead. |
void |
addDataOutputListener(CommandDataOutputListener l)
Deprecated. Kept for compatibility reasons only. Use addRegexOutputListener(org.netbeans.modules.vcscore.commands.RegexOutputListener) instead. |
void |
addErrorOutputListener(CommandOutputListener l)
Deprecated. Kept for compatibility reasons only. Use addTextErrorListener(org.netbeans.modules.vcscore.commands.TextOutputListener) instead. |
void |
addFileReaderListener(FileReaderListener l)
Add a file reader listener, that gets the updated attributes of the processed file(s). |
void |
addImmediateTextErrorListener(TextOutputListener l)
Add a listener to the standard error output, that will be noified immediately as soon as the output text is available. |
void |
addImmediateTextOutputListener(TextOutputListener l)
Add a listener to the standard output, that will be noified immediately as soon as the output text is available. |
void |
addOutputListener(CommandOutputListener l)
Deprecated. Kept for compatibility reasons only. Use addTextOutputListener(org.netbeans.modules.vcscore.commands.TextOutputListener) instead. |
void |
addRegexErrorListener(RegexOutputListener l)
Add the listener to the data error output of the command. |
void |
addRegexOutputListener(RegexOutputListener l)
Add the listener to the data output of the command. |
void |
addTextErrorListener(TextOutputListener l)
Add the listener to the error output of the command. |
void |
addTextOutputListener(TextOutputListener l)
Add the listener to the standard output of the command. |
static Collection |
createProcessingFiles(CommandExecutionContext executionContext,
Hashtable vars)
Get the set of files being processed by the command. |
VcsCommand |
getCommand()
The executed command. |
VcsDescribedCommand |
getDescribedCommand()
Deprecated. Needed for the compatibility with old "API" only. |
String |
getExec()
Get the updated execution string. |
int |
getExitStatus()
Get the exit status of the execution. |
Collection |
getFiles()
Get the set of files being processed by the command. |
protected VcsFileSystem |
getFileSystem()
|
CommandTask |
getTask()
Set the CommandTask, that is associated with this executor. |
Hashtable |
getVariables()
Get the variables used by this command execution. |
VcsCommandVisualizer |
getVisualizer()
Get the graphical visualization of the command. |
String |
preprocessCommand(VcsCommand vc,
Hashtable vars,
String exec,
StructuredExec sexec)
This method can be used to do some preprocessing of the command which is to be run. |
protected void |
printDataErrorOutput(String[] data)
|
protected void |
printDataErrorOutputReal(String[] data)
|
protected void |
printDataOutput(String[] data)
|
protected void |
printErrorOutput(String line)
|
protected void |
printOutput(String line)
|
void |
run()
Execute the command. |
protected void |
runClass(String exec,
String className,
String[] args)
Loads class of given name with some arguments and execute its exec() method. |
protected void |
runCommand(String[] execs)
Execute a command-line command. |
protected void |
runCommand(StructuredExec exec)
Execute a command-line command. |
void |
sendInput(String input)
Send an input string to the standard input of the command. |
protected static void |
setAdditionalParams(Object execCommand,
VcsFileSystem fileSystem)
Search for optional methods and set additional parameters. |
protected static void |
setAdditionalParams(Object execCommand,
VcsFileSystem fileSystem,
CommandExecutionContext executionContext)
Search for optional methods and set additional parameters. |
void |
setDescribedCommand(VcsDescribedCommand command)
Deprecated. Needed for the compatibility with old "API" only. |
void |
setTask(CommandTask task)
Get the CommandTask, that is associated with this executor. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String DEFAULT_REGEX
public static final String STATUS_USE_REG_EXP_PARSE_OUTPUT
protected int exitStatus
| Constructor Detail |
public ExecuteCommand(CommandExecutionContext executionContext, UserCommand cmd, Hashtable vars)
public ExecuteCommand(CommandExecutionContext executionContext, UserCommand cmd, Hashtable vars, String preferredExec)
| Method Detail |
public VcsDescribedCommand getDescribedCommand()
public void setDescribedCommand(VcsDescribedCommand command)
public CommandTask getTask()
public void setTask(CommandTask task)
public final void addTextOutputListener(TextOutputListener l)
addTextOutputListener in interface VcsCommandExecutorpublic final void addTextErrorListener(TextOutputListener l)
addTextErrorListener in interface VcsCommandExecutorpublic final void addRegexOutputListener(RegexOutputListener l)
addRegexOutputListener in interface VcsCommandExecutorpublic final void addRegexErrorListener(RegexOutputListener l)
addRegexErrorListener in interface VcsCommandExecutorpublic void addOutputListener(CommandOutputListener l)
addTextOutputListener(org.netbeans.modules.vcscore.commands.TextOutputListener) instead.
addOutputListener in interface VcsCommandExecutorpublic void addErrorOutputListener(CommandOutputListener l)
addTextErrorListener(org.netbeans.modules.vcscore.commands.TextOutputListener) instead.
addErrorOutputListener in interface VcsCommandExecutorpublic void addDataOutputListener(CommandDataOutputListener l)
addRegexOutputListener(org.netbeans.modules.vcscore.commands.RegexOutputListener) instead.
addDataOutputListener in interface VcsCommandExecutorpublic void addDataErrorOutputListener(CommandDataOutputListener l)
addRegexErrorListener(org.netbeans.modules.vcscore.commands.RegexOutputListener) instead.
addDataErrorOutputListener in interface VcsCommandExecutorpublic void addImmediateTextOutputListener(TextOutputListener l)
VcsCommandExecutor
addImmediateTextOutputListener in interface VcsCommandExecutorpublic void addImmediateTextErrorListener(TextOutputListener l)
VcsCommandExecutor
addImmediateTextErrorListener in interface VcsCommandExecutorpublic void sendInput(String input)
TextInput
input - The input text.public final VcsCommand getCommand()
VcsCommandExecutor
getCommand in interface VcsCommandExecutorpublic final Hashtable getVariables()
getVariables in interface VcsCommandExecutorpublic final int getExitStatus()
VcsCommandExecutor
getExitStatus in interface VcsCommandExecutorSUCCEEDED, FAILED, INTERRUPTED.public VcsCommandVisualizer getVisualizer()
getVisualizer in interface VcsCommandExecutorpublic String preprocessCommand(VcsCommand vc, Hashtable vars, String exec, StructuredExec sexec)
preprocessCommand in interface VcsCommandExecutorvc - the command to be preprocessed.vars - the variablesexec - the updated execution string. It may contain user input from variable input dialog
public String getExec()
getExec in interface VcsCommandExecutorprotected final VcsFileSystem getFileSystem()
protected void runCommand(String[] execs)
protected void runCommand(StructuredExec exec)
protected final void printOutput(String line)
protected final void printErrorOutput(String line)
protected void printDataOutput(String[] data)
protected void printDataErrorOutput(String[] data)
protected void printDataErrorOutputReal(String[] data)
protected void runClass(String exec, String className, String[] args)
className - the name of the class to be loadedargs - the argumentspublic void run()
protected static void setAdditionalParams(Object execCommand, VcsFileSystem fileSystem)
protected static void setAdditionalParams(Object execCommand, VcsFileSystem fileSystem, CommandExecutionContext executionContext)
public Collection getFiles()
getFiles in interface VcsCommandExecutorString relative
to the file system root.public static Collection createProcessingFiles(CommandExecutionContext executionContext, Hashtable vars)
String relative
to the file system root.public void addFileReaderListener(FileReaderListener l)
addFileReaderListener in interface VcsCommandExecutor
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||