站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

PreCommandPerformer (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.modules.vcscore.commands
Class PreCommandPerformer

java.lang.Object
  extended byorg.netbeans.modules.vcscore.commands.PreCommandPerformer

public class PreCommandPerformer
extends Object

This class checks if there are any commands to be run during preprocessing the command. If it finds any commands to be run (search for '{INSERT_OUTPUT_OF_(, ...)}' or '{FILE_OUTPUT_OF_(, ...)}' keys), execute them and replace with their output data elements which are listed as element_index.


Field Summary
static String FILE_OUTPUT
          Write the output of the command to a temporary file and insert the file path instead of this keyword.
static String INSERT_ERROR
          Insert the error output of the command instead of this keyword.
static String INSERT_OUTPUT
          Insert the output of the command instead of this keyword.
 
Constructor Summary
PreCommandPerformer(CommandExecutionContext executionContext, Hashtable vars)
          Creates new CommandPerformer
 
Method Summary
 String process(String exec)
          Execute all commands and insert their output to the exec string.
 String[] process(String[] execs)
          Execute all commands and insert their output to the provided strings.
 String[] process(String[] execs, Collection executedTasks)
          Execute all commands and insert their output to the provided strings.
 String process(String exec, Collection cmdExitStates)
          Execute all commands and insert their output to the exec string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSERT_OUTPUT

public static final String INSERT_OUTPUT
Insert the output of the command instead of this keyword.

See Also:
Constant Field Values

INSERT_ERROR

public static final String INSERT_ERROR
Insert the error output of the command instead of this keyword.

See Also:
Constant Field Values

FILE_OUTPUT

public static final String FILE_OUTPUT
Write the output of the command to a temporary file and insert the file path instead of this keyword.

See Also:
Constant Field Values
Constructor Detail

PreCommandPerformer

public PreCommandPerformer(CommandExecutionContext executionContext,
                           Hashtable vars)
Creates new CommandPerformer

Method Detail

process

public String process(String exec)
               throws UserCancelException
Execute all commands and insert their output to the exec string.

Returns:
the exec string with commands output.
Throws:
UserCancelException - when the user cancelles the command.

process

public String process(String exec,
                      Collection cmdExitStates)
               throws UserCancelException
Execute all commands and insert their output to the exec string.

Returns:
the exec string with commands output.
Throws:
UserCancelException - when the user cancelles the command.

process

public String[] process(String[] execs)
                 throws UserCancelException
Execute all commands and insert their output to the provided strings.

Returns:
the array of strings of the same size as the original array, with commands output filled to individual strings. The original array is not changed.
Throws:
UserCancelException

process

public String[] process(String[] execs,
                        Collection executedTasks)
                 throws UserCancelException
Execute all commands and insert their output to the provided strings.

Parameters:
executedTasks - The executed tasks are added into this collection.
Returns:
the array of strings of the same size as the original array, with commands output filled to individual strings. The original array is not changed.
Throws:
UserCancelException

 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.