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

UserCommand (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.modules.vcscore.cmdline
Class UserCommand

java.lang.Object
  extended byorg.netbeans.modules.vcscore.cmdline.UserCommand
All Implemented Interfaces:
Cloneable, Comparable, Node.Cookie, Serializable, VcsCommand, VcsCommandCookie

public class UserCommand
extends Object
implements VcsCommand, Serializable, Cloneable, Comparable

Single user defined command.

See Also:
Serialized Form

Field Summary
static String NAME_REFRESH_FILE
          The name of the command which refresh a file.
static String PROPERTY_DATA_REGEX
           
static String PROPERTY_DATA_REGEX_GLOBAL
           
static String PROPERTY_ERROR_REGEX
           
static String PROPERTY_ERROR_REGEX_GLOBAL
           
static String PROPERTY_INPUT
          A String property, that defines the input sequence that is sent to the command input.
static String PROPERTY_INPUT_REPEAT
          A Boolean property.
static String PROPERTY_LIST_INDEX_ATTR
           
static String PROPERTY_LIST_INDEX_DATE
           
static String PROPERTY_LIST_INDEX_FILE_NAME
           
static String PROPERTY_LIST_INDEX_LOCKER
           
static String PROPERTY_LIST_INDEX_REMOVED_FILE_NAME
           
static String PROPERTY_LIST_INDEX_REVISION
           
static String PROPERTY_LIST_INDEX_SIZE
           
static String PROPERTY_LIST_INDEX_STATUS
           
static String PROPERTY_LIST_INDEX_STICKY
           
static String PROPERTY_LIST_INDEX_TIME
           
static String PROPERTY_REFRESH_FILE_RELATIVE_PATH
          The relative path of files that are returned at index PROPERTY_LIST_INDEX_FILE_NAME.
static String PROPERTY_REFRESH_FILE_STATUS_SUBSTITUTIONS
          The list of pairs of quoted regular expressions and the status strings separated by commas.
static String PROPERTY_REFRESH_INFO_FROM_BOTH_DATA_OUTS
          The file refresh data information is normally read from the standard data output.
static String PROPERTY_REFRESH_PROCESSED_FILES
          When this property is true, refresh of the current folder is performed after successfull execution of this command.
 String[] userParams
          Additional user parameters local to this command.
 
Fields inherited from interface org.netbeans.modules.vcscore.commands.VcsCommand
EXEC_CONCURRENT_ALL, EXEC_SERIAL_ALL, EXEC_SERIAL_INERT, EXEC_SERIAL_OF_COMMAND, EXEC_SERIAL_ON_FILE, EXEC_SERIAL_ON_PACKAGE, EXEC_SERIAL_WITH_PARENT, EXEC_SERIAL_WITH_PENDING, NAME_DELETE_DIR, NAME_DELETE_FILE, NAME_EDIT, NAME_LOCK, NAME_REFRESH, NAME_REFRESH_RECURSIVELY, NAME_REVISION_LIST, NAME_REVISION_OPEN, NAME_SCHEDULE_ADD, NAME_SCHEDULE_REMOVE, NAME_SUFFIX_OFFLINE, NAME_UNLOCK, PROP_NAME_FOR_INTERNAL_USE_ONLY, PROPERTY_ADVANCED_NAME, PROPERTY_ASSOCIATED_COMMAND_INTERFACE_NAME, PROPERTY_CHANGED_REVISION_VAR_NAME, PROPERTY_CHANGING_NUM_REVISIONS, PROPERTY_CHANGING_REVISION, PROPERTY_CHECK_FOR_MODIFICATIONS, PROPERTY_CLEAN_UNIMPORTANT_FILES_ON_SUCCESS, PROPERTY_COMMANDS_AFTER_FAIL, PROPERTY_COMMANDS_AFTER_SUCCESS, PROPERTY_CONCURRENT_EXECUTION, PROPERTY_CONCURRENT_EXECUTION_WITH, PROPERTY_CONFIRMATION_MSG, PROPERTY_DISABLED_ON_STATUS, PROPERTY_DISABLED_WHEN_NOT_LOCKED, PROPERTY_DISPLAY_INTERACTIVE_OUTPUT, PROPERTY_DISPLAY_PLAIN_OUTPUT, PROPERTY_DISPLAY_VISUALIZER, PROPERTY_DISTINGUISH_BINARY_FILES, PROPERTY_EXEC, PROPERTY_EXEC_PRIORITY, PROPERTY_EXEC_SCHEDULED_COMMAND, PROPERTY_EXEC_STRUCTURED, PROPERTY_GENERAL_COMMAND_ACTION_CLASS_NAME, PROPERTY_GENERAL_COMMAND_ACTION_DISPLAY_NAME, PROPERTY_HIDDEN, PROPERTY_HIDDEN_TEST_EXPRESSION, PROPERTY_IGNORE_FAIL, PROPERTY_INPUT_DESCRIPTOR, PROPERTY_LABEL_MNEMONIC, PROPERTY_LOAD_ATTRS_TO_VARS, PROPERTY_MERGE_ERROR_TO_STANDARD_OUTPUT, PROPERTY_NEEDS_HIERARCHICAL_ORDER, PROPERTY_NOTIFICATION_FAIL_MSG, PROPERTY_NOTIFICATION_SUCCESS_MSG, PROPERTY_NUM_REVISIONS, PROPERTY_ON_DIR, PROPERTY_ON_FILE, PROPERTY_ON_NON_RECURSIVE_DIR, PROPERTY_ON_ROOT, PROPERTY_PRE_COMMANDS, PROPERTY_PROCESS_ALL_FILES, PROPERTY_REFRESH_CURRENT_FOLDER, PROPERTY_REFRESH_ON_FAIL, PROPERTY_REFRESH_PARENT_FOLDER, PROPERTY_REFRESH_PARENT_OF_CURRENT_FOLDER, PROPERTY_REFRESH_RECURSIVELY_PATTERN_MATCHED, PROPERTY_REFRESH_RECURSIVELY_PATTERN_UNMATCHED, PROPERTY_RUN_ON_MULTIPLE_FILES, PROPERTY_RUN_ON_MULTIPLE_FILES_IN_FOLDER, PROPERTY_SUPPORTS_ADVANCED_MODE, PROPERTY_USER_PARAMS, REFRESH_ON_FAIL_FALSE, REFRESH_ON_FAIL_TRUE, REFRESH_ON_FAIL_TRUE_ON_FOLDERS
 
Constructor Summary
UserCommand()
           
UserCommand(String name)
          Deprecated. This constructor is necessary for backward compatibility to be able to read the command from properties file.
 
Method Summary
 Object clone()
           
 int compareTo(Object o)
          Compares this command with a specified command for order.
 void copyFrom(VcsCommand vc)
          Fill all properties from the given user command.
 String getDisplayName()
          Get the display name of the command.
 String getName()
          Get the name of the command.
 int[] getOrder()
          Deprecated. See setOrder for description.
 String getOrderString()
           
static String getOrderString(int[] orderArr)
           
 Object getProperty(String propertyName)
          Get the additional command property.
 String[] getPropertyNames()
          Get the names of all supported properties.
static void readFinished(List cmds)
          This method is called after read of all commands from an external source.
 void setDisplayName(String displayName)
          Set the display name of the command.
 void setName(String name)
          Set the name of the command.
 void setOrder(int[] orderArr)
          Deprecated. The order of individual commands should not be set. The position in the popup menu is given by the hierarchical structure of nodes.
 void setProperty(String propertyName, Object value)
          Set the additional property to the command.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_REFRESH_FILE

public static final String NAME_REFRESH_FILE
The name of the command which refresh a file.

See Also:
Constant Field Values

PROPERTY_REFRESH_PROCESSED_FILES

public static final String PROPERTY_REFRESH_PROCESSED_FILES
When this property is true, refresh of the current folder is performed after successfull execution of this command.

See Also:
Constant Field Values

PROPERTY_INPUT

public static final String PROPERTY_INPUT
A String property, that defines the input sequence that is sent to the command input.

See Also:
Constant Field Values

PROPERTY_INPUT_REPEAT

public static final String PROPERTY_INPUT_REPEAT
A Boolean property. When true and when the PROPERTY_INPUT is defined, the input sequence is repeated infinite times.

See Also:
Constant Field Values

PROPERTY_DATA_REGEX

public static final String PROPERTY_DATA_REGEX
See Also:
Constant Field Values

PROPERTY_ERROR_REGEX

public static final String PROPERTY_ERROR_REGEX
See Also:
Constant Field Values

PROPERTY_DATA_REGEX_GLOBAL

public static final String PROPERTY_DATA_REGEX_GLOBAL
See Also:
Constant Field Values

PROPERTY_ERROR_REGEX_GLOBAL

public static final String PROPERTY_ERROR_REGEX_GLOBAL
See Also:
Constant Field Values

PROPERTY_LIST_INDEX_FILE_NAME

public static final String PROPERTY_LIST_INDEX_FILE_NAME
See Also:
Constant Field Values

PROPERTY_LIST_INDEX_REMOVED_FILE_NAME

public static final String PROPERTY_LIST_INDEX_REMOVED_FILE_NAME
See Also:
Constant Field Values

PROPERTY_LIST_INDEX_STATUS

public static final String PROPERTY_LIST_INDEX_STATUS
See Also:
Constant Field Values

PROPERTY_LIST_INDEX_LOCKER

public static final String PROPERTY_LIST_INDEX_LOCKER
See Also:
Constant Field Values

PROPERTY_LIST_INDEX_REVISION

public static final String PROPERTY_LIST_INDEX_REVISION
See Also:
Constant Field Values

PROPERTY_LIST_INDEX_STICKY

public static final String PROPERTY_LIST_INDEX_STICKY
See Also:
Constant Field Values

PROPERTY_LIST_INDEX_ATTR

public static final String PROPERTY_LIST_INDEX_ATTR
See Also:
Constant Field Values

PROPERTY_LIST_INDEX_DATE

public static final String PROPERTY_LIST_INDEX_DATE
See Also:
Constant Field Values

PROPERTY_LIST_INDEX_TIME

public static final String PROPERTY_LIST_INDEX_TIME
See Also:
Constant Field Values

PROPERTY_LIST_INDEX_SIZE

public static final String PROPERTY_LIST_INDEX_SIZE
See Also:
Constant Field Values

PROPERTY_REFRESH_FILE_STATUS_SUBSTITUTIONS

public static final String PROPERTY_REFRESH_FILE_STATUS_SUBSTITUTIONS
The list of pairs of quoted regular expressions and the status strings separated by commas. When this property is non-empty, the status returned by the command will be matched with the regular expressions (from left to right) and when matched, the appropriate status will be returned. When no match would be possible, the file will be refreshed by the LIST_FILE command.

See Also:
Constant Field Values

PROPERTY_REFRESH_INFO_FROM_BOTH_DATA_OUTS

public static final String PROPERTY_REFRESH_INFO_FROM_BOTH_DATA_OUTS
The file refresh data information is normally read from the standard data output. If you want to add the error data output, set this property as true.

See Also:
Constant Field Values

PROPERTY_REFRESH_FILE_RELATIVE_PATH

public static final String PROPERTY_REFRESH_FILE_RELATIVE_PATH
The relative path of files that are returned at index PROPERTY_LIST_INDEX_FILE_NAME. If not defined, the default relative path is the greatest parent of all selected folders. If one folder is selected, it's that folder, if one file is selected, it is it's parent. The path is relative to ROOTDIR.

See Also:
Constant Field Values

userParams

public volatile String[] userParams
Additional user parameters local to this command.

Constructor Detail

UserCommand

public UserCommand()

UserCommand

public UserCommand(String name)
Deprecated. This constructor is necessary for backward compatibility to be able to read the command from properties file.

Method Detail

clone

public Object clone()

copyFrom

public void copyFrom(VcsCommand vc)
Fill all properties from the given user command.


compareTo

public int compareTo(Object o)
Compares this command with a specified command for order.

Specified by:
compareTo in interface Comparable

setName

public void setName(String name)
Description copied from interface: VcsCommand
Set the name of the command.

Specified by:
setName in interface VcsCommand

getName

public String getName()
Description copied from interface: VcsCommand
Get the name of the command.

Specified by:
getName in interface VcsCommand

setDisplayName

public void setDisplayName(String displayName)
Description copied from interface: VcsCommand
Set the display name of the command. It will be visible on the popup menu under this name. When null, the command will not be visible on the popup menu.

Specified by:
setDisplayName in interface VcsCommand

getDisplayName

public String getDisplayName()
Description copied from interface: VcsCommand
Get the display name of the command. It will be visible on the popup menu under this name. When null, the command will not be visible on the popup menu.

Specified by:
getDisplayName in interface VcsCommand

setOrder

public void setOrder(int[] orderArr)
Deprecated. The order of individual commands should not be set. The position in the popup menu is given by the hierarchical structure of nodes.


getOrder

public int[] getOrder()
Deprecated. See setOrder for description.


toString

public String toString()

getOrderString

public String getOrderString()

getOrderString

public static String getOrderString(int[] orderArr)

getPropertyNames

public String[] getPropertyNames()
Get the names of all supported properties.

Specified by:
getPropertyNames in interface VcsCommand
Returns:
the array of properties names

getProperty

public Object getProperty(String propertyName)
Get the additional command property.

Specified by:
getProperty in interface VcsCommand
Parameters:
propertyName - the name of the property
Returns:
the value of the property

setProperty

public void setProperty(String propertyName,
                        Object value)
Set the additional property to the command.

Specified by:
setProperty in interface VcsCommand
Parameters:
propertyName - the name of the property
value - the value of the property. The null value should unset the property

readFinished

public static void readFinished(List cmds)
This method is called after read of all commands from an external source. Allows some more settings to be done.

Parameters:
cmds - the Vector containing all read commands.

 

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