当前页面:
在线文档首页 >
NetBeans API Javadoc 4.1.0
VcsFSCommandsAction (NetBeans VCS API) - NetBeans API Javadoc 4.1.0
org.netbeans.modules.vcscore
Class VcsFSCommandsAction
java.lang.Object
org.openide.util.SharedClassObject
org.openide.util.actions.SystemAction
org.openide.util.actions.CallableSystemAction
org.openide.util.actions.NodeAction
org.netbeans.modules.vcscore.VcsFSCommandsAction
- All Implemented Interfaces:
- Action, ActionListener, ContextAwareAction, ContextAwareDelegateAction.Delegatable, EventListener, Externalizable, HelpCtx.Provider, Presenter, Presenter.Menu, Presenter.Popup, Presenter.Toolbar, Serializable
- public class VcsFSCommandsAction
- extends NodeAction
- implements ActionListener, ContextAwareDelegateAction.Delegatable
The system action with VCS commands, that are provided by the FileSystem.
- See Also:
- Serialized Form
Methods inherited from class org.openide.util.actions.SystemAction |
clearSharedData, createPopupMenu, createToolbarPresenter, get, getIcon, getIcon, getValue, iconResource, linkActions, putValue, setIcon |
Methods inherited from class org.openide.util.SharedClassObject |
addPropertyChangeListener, equals, finalize, findObject, findObject, firePropertyChange, getLock, getProperty, hashCode, putProperty, putProperty, readExternal, removePropertyChangeListener, reset, writeExternal, writeReplace |
selectedFileObjects
protected Collection selectedFileObjects
VcsFSCommandsAction
public VcsFSCommandsAction()
- Creates a new instance of VcsFSCommandsAction
getName
public String getName()
- Get a human presentable name of the action.
- Returns:
- the name of the action
enable
public boolean enable(Node[] nodes)
- Test whether the action should be enabled based on the currently activated nodes.
- Specified by:
enable
in interface ContextAwareDelegateAction.Delegatable
- Returns:
- true for non-empty set of nodes.
getMenuPresenter
public JMenuItem getMenuPresenter()
- Get a menu item that can present this action in a
JMenu
.
- Specified by:
getMenuPresenter
in interface Presenter.Menu
getPopupPresenter
public JMenuItem getPopupPresenter()
- Get a menu item that can present this action in a
JPopupMenu
.
- Specified by:
getPopupPresenter
in interface Presenter.Popup
getPresenter
public JMenuItem getPresenter(boolean inMenu,
Lookup lookup)
- Specified by:
getPresenter
in interface ContextAwareDelegateAction.Delegatable
createMenuItems
public JMenuItem[] createMenuItems(boolean inMenu,
Lookup lookup)
createMenuItems
public JMenuItem[] createMenuItems(boolean inMenu,
Lookup lookup,
boolean checkFSAction)
performAction
protected void performAction(Node[] nodes)
- This action does not have a generic performer, since it's composed from all VCS commands.
Use actionPerformed() with the command's name as the action command.
executeCommand
public static CommandTask executeCommand(Command cmd,
FileObject[] files)
- Execute the command. If the command is CheckInCommand, check for the
presence of VcsObjectIntegritySupport is done and AddCommand is performed
if necessary.
Every command execution, that wish to present the object integrity dialog
should go through this method.
- Parameters:
cmd
- The command to execute.files
- The files to act on. It's necessary to pass the files here
rather than set them directly to the command, because the command
can ignore some files, that would then not be considered for addition.
- Returns:
- The task representing the running command or
null
when
the command is not executed.
getHelpCtx
public HelpCtx getHelpCtx()
- Get a help context for the action.
- Specified by:
getHelpCtx
in interface HelpCtx.Provider
- Returns:
- the help context for this action
createContextAwareInstance
public Action createContextAwareInstance(Lookup actionContext)
- Specified by:
createContextAwareInstance
in interface ContextAwareAction