|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.netbeans.spi.vcs.commands.CommandSupport org.netbeans.modules.vcscore.cmdline.UserCommandSupport
The adapter from UserCommand to CommandSupport. This class is used to transfer the VcsCommand approach to the new org.netbeans.api.vcs.commands.Command approach.
Field Summary | |
static String |
VAR_ARGUMENT_FILES_TO_CLONE
The list of variables, that contains file paths which will be clonned when a next command is created. |
Constructor Summary | |
UserCommandSupport(UserCommand cmd,
CommandExecutionContext executionContext)
Creates a new instance of UserCommandSupport |
Method Summary | |
boolean |
canProcessFoldersNonRecursively()
Tells, whether the created commands will be able to process folders non-recursively. |
protected Object |
clone()
Subclasses need to implement the clone() method in order the command creation work properly. |
protected CommandTaskSupport |
createTask(Command command)
Create the CommandTask, that is supposed to execute the command. |
protected int |
execute(CommandTask task)
Perform the actual execution of the command from the provided info. |
Class |
getActionClass()
Get the class of the action. |
String |
getActionDisplayName()
Get the display name of the action. |
FileObject[] |
getApplicableFiles(FileObject[] files)
Find, whether this command can act on a set of files. |
String |
getDisplayName()
Get the display name of the command. |
CommandExecutionContext |
getExecutionContext()
Get the execution context, that is associated with this support. |
Class[] |
getImplementedCommandClasses()
|
String |
getName()
Get the name of the command. |
UserCommand |
getVcsCommand()
Get the UserCommand associated with this support. |
boolean |
hasExpertMode()
Whether the command supports an expert mode. |
protected void |
initializeCommand(Command cmd)
Initialize the command after it's created. |
Object |
run()
Create the customizer for the command. |
static boolean |
setCommandFilesFromTable(Command command,
Table files,
CommandExecutionContext executionContext)
Set the files as arguments to the command. |
static void |
setVariables(VcsCommand command,
Table files,
Hashtable vars,
VariableValueAdjustment valueAdjustment,
String relativeMountPoint,
boolean useGreatestParentPaths)
Add files specific variables. |
String |
toString()
For debug purposes only. |
Methods inherited from class org.netbeans.spi.vcs.commands.CommandSupport |
canExecute, createCommand, getCommand, getCommand, getListeners, stop |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String VAR_ARGUMENT_FILES_TO_CLONE
Constructor Detail |
public UserCommandSupport(UserCommand cmd, CommandExecutionContext executionContext)
Method Detail |
public UserCommand getVcsCommand()
public CommandExecutionContext getExecutionContext()
public String getName()
getName
in class CommandSupport
public String toString()
public String getDisplayName()
null
, the command will not be visible on the popup menu.
getDisplayName
in class CommandSupport
public Class[] getImplementedCommandClasses()
public boolean hasExpertMode()
hasExpertMode
in class CommandSupport
protected CommandTaskSupport createTask(Command command)
CommandSupport
CommandTaskSupport
.
createTask
in class CommandSupport
command
- The copy of the customized command, that can be used
by the task to get the customized information.
protected int execute(CommandTask task)
execute
in class CommandSupport
public FileObject[] getApplicableFiles(FileObject[] files)
getApplicableFiles
in class CommandSupport
files
- The array of files to inspect
null
when
it can not act on any file listed.public boolean canProcessFoldersNonRecursively()
RecursionAwareCommandSupport
RecursionAwareCommand
and when setRecursionBanned(true)
is called on them, they should still return non-null
from getApplicableFiles()
method for some files.
canProcessFoldersNonRecursively
in interface RecursionAwareCommandSupport
protected Object clone() throws CloneNotSupportedException
CommandSupport
clone
in class CommandSupport
CloneNotSupportedException
protected void initializeCommand(Command cmd)
initializeCommand
in class CommandSupport
cmd
- The command to be customized.public Object run()
run
in interface PrivilegedAction
public Class getActionClass()
getActionClass
in interface ActionCommandSupport
public String getActionDisplayName()
getActionDisplayName
in interface ActionCommandSupport
public static boolean setCommandFilesFromTable(Command command, Table files, CommandExecutionContext executionContext)
command
- The command to set the files on.files
- The table of file names and associated FileObjects.
public static void setVariables(VcsCommand command, Table files, Hashtable vars, VariableValueAdjustment valueAdjustment, String relativeMountPoint, boolean useGreatestParentPaths)
command
- variables target commandfiles
- the table of filesvars
- the table of variables to extendvalueAdjustment
- the variable value adjustment utility objectuseGreatestParentPaths
- whether to define COMMON_PARENT variable and
change the file paths to be relative to this greatest common parent
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |