|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1) E13403-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.controller.Command oracle.jdeveloper.vcs.spi.VCSCommand
public abstract class VCSCommand
Abstract superclass for version control commands.
Field Summary | |
---|---|
static int |
CANCEL
Command execution CANCEL status. |
static int |
ERROR
Command execution ERROR status (exception handled). |
static int |
NOOP
Command execution NOOP status (no operation, invalid context). |
static int |
OK
Command execution OK status. |
Fields inherited from class oracle.ide.controller.Command |
---|
context, EXECUTING, MULTI_NODE, NO_CHANGE, NO_UNDO, NORMAL, type |
Constructor Summary | |
---|---|
protected |
VCSCommand(int cmdId)
Constructor. |
protected |
VCSCommand(int cmdId,
int type)
Constructor. |
protected |
VCSCommand(int cmdId,
int type,
java.lang.String name)
Constructor. |
Method Summary | |
---|---|
protected Context |
buildContextForEditor()
Build a context for invoking an editor. |
protected VCSStatusFilter |
createStatusFilter(VCSStatus[] statuses)
Creates a VCSStatus filter that accepts only the given statuses. |
int |
doit()
Executes the actions associated with a specific command. |
protected abstract int |
doitImpl()
Executes the actions associated with a specific version control command (implementation). |
protected void |
fireFileStructureChanged(java.net.URL[] urls)
Fires notification that the structure of the given URLs has changed. |
protected void |
fireSomeFilesCreated(java.net.URL[] urls)
Fires notification that the given URLs have been created, where existent. |
protected void |
fireSomeFilesDeleted(java.net.URL[] urls)
Fires notification that the given URLs have been deleted, where non-existent. |
protected Locatable[] |
getContextLocatables()
Gets the valid locatables from the context node selection, applying the filter returned by getLocatableURLFilter() . |
protected VCSExceptionHandler |
getExceptionHandler()
Get the exception handler used to report errors from this command. |
protected VCSExtension |
getExtension()
|
protected java.util.Collection |
getFilteredSelection()
Gets the filtered Locatable selection based on the context and the command's defined status cache and filter. |
protected java.util.Collection |
getFilteredSelection(Locatable[] locatables)
Gets the filtered Locatable selection based on given selection and the command's defined status cache and filter. |
protected URLFilter |
getLocatableURLFilter()
Deprecated. replaced by getURLFilter() . |
protected VCSStatusCache |
getStatusCache()
Gets the status cache for the VCS command. |
protected VCSStatusFilter |
getStatusFilter()
Gets the status filter for the VCS command. |
protected URLFilter |
getURLFilter()
Gets the URL filter controlling locatables in the command context. |
protected void |
initializeCommandStyle(VCSCommandStyle commandStyle)
Initializes the style of this command, a construction-time requirement. |
protected void |
initializeCommandType(VCSCommandType commandType)
|
boolean |
isAvailable()
|
protected boolean |
isAvailableImpl()
Asks whether the command is available for the current context. |
protected boolean |
isAvailableImpl(Locatable locatable)
Asks whether the command is available for the current context. |
protected boolean |
isAvailableImpl(Locatable[] locatables)
Asks whether the command is available for the current context. |
protected boolean |
isAvailableImpl(java.net.URL url)
Asks whether the command is available for the current context. |
protected boolean |
isThreaded()
Asks whether this command should be executed on a separate temporary thread. |
void |
noOp()
|
protected void |
noOpImpl()
Performs actions, such as exception notification, when a command exits with the VCSCommand.NOOP code. |
protected void |
reloadBuffers(java.util.Map timestampMap)
|
protected java.util.Map |
storeTimestamps(java.util.Collection nodes)
|
protected void |
updateReadOnlyStates(Node[] nodes)
Updates the editor read-only states of nodes for the given URLs. |
Methods inherited from class oracle.ide.controller.Command |
---|
getAffectedNodes, getContext, getData, getId, getName, getType, isGlobal, setContext, setData, undo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int OK
public static final int CANCEL
public static final int ERROR
public static final int NOOP
Constructor Detail |
---|
protected VCSCommand(int cmdId)
cmdId
- the command id.protected VCSCommand(int cmdId, int type)
cmdId
- the command id.type
- the command type.protected VCSCommand(int cmdId, int type, java.lang.String name)
cmdId
- the command id.type
- the command type.name
- the command name, for undo and redo.Method Detail |
---|
protected void initializeCommandStyle(VCSCommandStyle commandStyle)
commandStyle
- the style of the command to set.protected void initializeCommandType(VCSCommandType commandType)
public int doit() throws java.lang.Exception
Command
doit
in class Command
java.lang.Exception
public boolean isAvailable()
public void noOp()
protected boolean isAvailableImpl() throws java.lang.Exception
true
if the command style is VCSCommandStyle.NORMAL
, otherwise calls isAvailableImpl(Locatable[])
with contextual locatables.
java.lang.Exception
protected boolean isAvailableImpl(Locatable[] locatables) throws java.lang.Exception
VCSCommandStyle
, otherwise calls isAvailableImpl(Locatable)
.
java.lang.Exception
protected boolean isAvailableImpl(Locatable locatable) throws java.lang.Exception
false
if the Locatable
's URL is null or filtered by the locatable URL filter, otherwhise calls otherwise calls isAvailableImpl(URL)
.
java.lang.Exception
protected boolean isAvailableImpl(java.net.URL url) throws java.lang.Exception
true
if either getStatusCache()
or getStatusFilter()
return null
, otherwise uses the acceptance value of the status filter.
java.lang.Exception
protected void noOpImpl() throws VCSException
VCSCommand.NOOP
code.
VCSException
- if the non-operation of the command is an exceptional state.protected abstract int doitImpl() throws java.lang.Exception
java.lang.Exception
protected VCSExtension getExtension()
protected VCSExceptionHandler getExceptionHandler()
protected URLFilter getURLFilter()
protected VCSStatusCache getStatusCache()
protected VCSStatusFilter getStatusFilter()
protected boolean isThreaded()
protected final Locatable[] getContextLocatables()
getLocatableURLFilter()
.
protected final Context buildContextForEditor()
protected final void updateReadOnlyStates(Node[] nodes)
nodes
- the nodes for read-only state updates.protected final VCSStatusFilter createStatusFilter(VCSStatus[] statuses)
VCSStatus
filter that accepts only the given statuses.
statuses
- status objects accepted by the created filter.
VCSStatus
filter instance.protected final void fireSomeFilesCreated(java.net.URL[] urls)
urls
- the URLs for the event.protected final void fireSomeFilesDeleted(java.net.URL[] urls)
urls
- the URLs for the event.protected final void fireFileStructureChanged(java.net.URL[] urls)
urls
- the URLs for the event.protected final java.util.Map storeTimestamps(java.util.Collection nodes)
NodeUtil.storeTimestamps(Map,Collection)
protected final void reloadBuffers(java.util.Map timestampMap)
NodeUtil.reloadBuffers(Map)
protected final java.util.Collection getFilteredSelection() throws java.lang.Exception
Locatable
selection based on the context and the command's defined status cache and filter.
java.lang.Exception
protected final java.util.Collection getFilteredSelection(Locatable[] locatables) throws java.lang.Exception
Locatable
selection based on given selection and the command's defined status cache and filter.
locatables
- the locatables to filter.
java.lang.Exception
protected URLFilter getLocatableURLFilter()
getURLFilter()
.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1) E13403-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |