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

VcsManager (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.api.vcs
Class VcsManager

java.lang.Object
  extended byorg.netbeans.api.vcs.VcsManager

public class VcsManager
extends Object

The management of VCS actions. This class is a singleton, the instance is accessible through getDefault(). Do not try to instantiate.


Method Summary
 Command createCommand(Class cmdClass, FileObject[] files)
          Create a command of the given class, that will act on the array of files.
 Command createCommand(String cmdName, FileObject[] files)
          Create a command of the given name, that will act on the array of files.
 String[] findCommands(FileObject[] files)
          Get the available commands for a set of files.
static VcsManager getDefault()
          Get the default implementation of VcsManager.
 FileStatusInfo getFileStatus(FileObject file)
          Get the file status information.
 boolean showCustomizer(Command cmd)
          Let the user to visually customize the command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefault

public static VcsManager getDefault()
Get the default implementation of VcsManager.


findCommands

public String[] findCommands(FileObject[] files)
Get the available commands for a set of files.

Returns:
The array of command names.

createCommand

public Command createCommand(String cmdName,
                             FileObject[] files)
                      throws IllegalArgumentException
Create a command of the given name, that will act on the array of files.

Parameters:
cmdName - The name of the command.
files - The array of files to act on.
Returns:
The Command instance or null if no such command exist or can not be run on provided files.
Throws:
IllegalArgumentException

createCommand

public Command createCommand(Class cmdClass,
                             FileObject[] files)
                      throws IllegalArgumentException
Create a command of the given class, that will act on the array of files.

Parameters:
cmdClass - The class type of the command. It has to be a class or interface extending Command.
files - The array of files to act on.
Returns:
The Command instance or null if no such command exist or can not be run on provided files.
Throws:
IllegalArgumentException

showCustomizer

public boolean showCustomizer(Command cmd)
Let the user to visually customize the command. The method blocks until the customization is done.

Parameters:
cmd - The command to customize.
Returns:
True if the customization was successfull (the user pressed the OK button) or False if the customization was cancelled (the user pressed the Cancel button).

getFileStatus

public FileStatusInfo getFileStatus(FileObject file)
Get the file status information.

Parameters:
file - The file to find the status for
Returns:
The instance of FileStatusInfo or null when the file status is unknown or no status provider was found for this file.

 

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