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

DefaultVcsCommandsProvider (NetBeans VCS API) - NetBeans API Javadoc 4.1.0

 

org.netbeans.modules.vcscore
Class DefaultVcsCommandsProvider

java.lang.Object
  extended byorg.netbeans.spi.vcs.VcsCommandsProvider
      extended byorg.netbeans.modules.vcscore.DefaultVcsCommandsProvider
All Implemented Interfaces:
CommandsTree.Provider

public class DefaultVcsCommandsProvider
extends VcsCommandsProvider
implements CommandsTree.Provider

The default implementation of VcsCommandsProvider based on commands provided by CommandsTree.


Field Summary
 
Fields inherited from interface org.netbeans.modules.vcscore.commands.CommandsTree.Provider
PROP_COMMANDS
 
Constructor Summary
DefaultVcsCommandsProvider(CommandsTree commands)
          Creates a new instance of DefaultVcsCommandsProvider
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Add a property change listener to this provider.
 Command createCommand(Class cmdClass)
          Create a new VCS command of the given class type.
 Command createCommand(String cmdName)
          Create a new VCS command of the given name.
 String[] getCommandNames()
          Get the list of VCS command names.
 CommandsTree getCommands()
          Get the commands.
 String getType()
          Get the unique representation of the type of the provided version control system.
 boolean isExpertMode()
          Get the expert mode of this commands provider.
 void removePropertyChangeListener(PropertyChangeListener l)
          Remove the property change listener, that is attached to this provider.
 void setCommands(CommandsTree commands)
           
 void setExpertMode(boolean expertMode)
          Set the expert mode of this commands provider.
 void setType(String type)
           
 
Methods inherited from class org.netbeans.spi.vcs.VcsCommandsProvider
findProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultVcsCommandsProvider

public DefaultVcsCommandsProvider(CommandsTree commands)
Creates a new instance of DefaultVcsCommandsProvider

Method Detail

setExpertMode

public void setExpertMode(boolean expertMode)
Set the expert mode of this commands provider. If it's true, all commands have the expert mode turned on by default;

Specified by:
setExpertMode in interface CommandsTree.Provider

isExpertMode

public boolean isExpertMode()
Get the expert mode of this commands provider. If it's true, all commands have the expert mode turned on by default;

Specified by:
isExpertMode in interface CommandsTree.Provider

createCommand

public Command createCommand(Class cmdClass)
Create a new VCS command of the given class type.

Specified by:
createCommand in class VcsCommandsProvider
Returns:
The command or null when the command of the given class type does not exist.

createCommand

public Command createCommand(String cmdName)
Create a new VCS command of the given name.

Specified by:
createCommand in class VcsCommandsProvider
Returns:
The command or null when the command of the given name does not exist.

getCommandNames

public String[] getCommandNames()
Get the list of VCS command names.

Specified by:
getCommandNames in class VcsCommandsProvider

getCommands

public CommandsTree getCommands()
Description copied from interface: CommandsTree.Provider
Get the commands.

Specified by:
getCommands in interface CommandsTree.Provider
Returns:
The root of the commands tree.

setCommands

public void setCommands(CommandsTree commands)

setType

public void setType(String type)

getType

public String getType()
Description copied from class: VcsCommandsProvider
Get the unique representation of the type of the provided version control system. Paired with command name creates a unique command identification. MUST be redefined to return meaningful value, it's not abstract just for compatability reasons.

Overrides:
getType in class VcsCommandsProvider
Returns:
The unique type of the provided VCS.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Add a property change listener to this provider. The listener is called whenever the provided commands change.

Specified by:
addPropertyChangeListener in interface CommandsTree.Provider

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Remove the property change listener, that is attached to this provider.

Specified by:
removePropertyChangeListener in interface CommandsTree.Provider

 

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