oracle.jdeveloper.vcs.spi
Class VCSAbstractCommand
java.lang.Object
oracle.ide.addin.AbstractCommand
oracle.jdeveloper.vcs.spi.VCSAbstractCommand
- All Implemented Interfaces:
- Command, VCSCommand
- public abstract class VCSAbstractCommand
- extends AbstractCommand
- implements VCSCommand
Abstract superclass for version control commands.
- Since:
- 9.0.5
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VCSAbstractCommand
protected VCSAbstractCommand(int cmdId)
- Constructor.
- Parameters:
cmdId
- the command id.
VCSAbstractCommand
protected VCSAbstractCommand(int cmdId,
int type)
- Constructor.
- Parameters:
cmdId
- the command id.
type
- the command type.
VCSAbstractCommand
protected VCSAbstractCommand(int cmdId,
int type,
java.lang.String name)
- Constructor.
- Parameters:
cmdId
- the command id.
type
- the command type.
name
- the command name, for undo and redo.
doit
public int doit()
throws java.lang.Exception
- Description copied from interface:
Command
- Executes the actions associated with a specific command. When a command executes successfully, implementations should return OK, otherwise, return CANCEL or any other non-zero value.
-
- Specified by:
doit
in interface Command
-
- Throws:
java.lang.Exception
getArguments
public VCSArguments getArguments()
- Description copied from interface:
VCSCommand
- Gets the arguments object associated with this command.
-
- Specified by:
getArguments
in interface VCSCommand
-
- Returns:
- the command arguments.
isAvailable
public boolean isAvailable()
noOp
public void noOp()
setThreadAuthorized
public void setThreadAuthorized(boolean authorized)
isAvailableImpl
protected boolean isAvailableImpl()
throws java.lang.Exception
-
- Throws:
java.lang.Exception
isThreaded
protected boolean isThreaded()
noOpImpl
protected void noOpImpl()
throws VCSException
-
- Throws:
VCSException
doitImpl
protected abstract int doitImpl()
throws java.lang.Exception
-
- Throws:
java.lang.Exception
getExceptionHandler
protected VCSExceptionHandler getExceptionHandler()
- Get the exception handler used to report errors from this command.
-
- Returns:
- an exception handler.
getLocatableURLFilter
protected URLFilter getLocatableURLFilter()
- Gets the URL filter controlling locatables in the command context.
-
- Returns:
- the command's URL filter.
getContextLocatables
protected final Locatable[] getContextLocatables()
- Gets the valid locatables from the context node selection, applying the filter returned by
getLocatableURLFilter()
.
-
- Returns:
- the valid locatable context.
buildContextForEditor
protected final Context buildContextForEditor()
- Build a context for invoking an editor. Certain elements in the IDE implement Locatable but not Document. As a result, you can't normally invoke an editor on such documents. This method provides a workaround for this problem. Whenever invoking an editor from a VCS command, you should use this method in preference to getContext() to ensure that Locatables are properly wrapped in Document implementing interfaces.
-
- Returns:
- a modified context that can be used to invoke an editor on the context locatable.
updateReadOnlyStates
protected final void updateReadOnlyStates(Document[] documents)
- Updates the editor read-only states of documents for the given URLs.
Copyright © 1997, 2004, Oracle. All rights reserved.