Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

oracle.jdeveloper.java
Class JavaManager.TransactionCommand

java.lang.Object
  extended by oracle.ide.controller.Command
      extended by oracle.jdeveloper.java.JavaManager.TransactionCommand
Enclosing class:
JavaManager

protected class JavaManager.TransactionCommand
extends Command

A Command implementation that wraps a committed transaction. This will take care of IDE integration issues such as Undo support and notification.


Field Summary
 
Fields inherited from class oracle.ide.controller.Command
CANCEL, context, EXECUTING, MULTI_NODE, NO_CHANGE, NO_UNDO, NORMAL, OK, type
 
Constructor Summary
protected JavaManager.TransactionCommand(javax.swing.undo.UndoableEdit undoableEdit, java.net.URL url, TransactionDescriptor descriptor)
          Constructs a new EditCommand for editing the specified Document using the provided Edit instance.
protected JavaManager.TransactionCommand(java.net.URL url)
          Constructs a new EditCommand for editing the specified Document using the provided Edit instance.
 
Method Summary
 int doit()
          Executes the actions associated with a specific command.
 int undo()
          Called by the CommandProcessor to undo a command When a command executes successfully, implementations should return OK, otherwise, return CANCEL or any other non-zero value.
 
Methods inherited from class oracle.ide.controller.Command
getAffectedNodes, getContext, getData, getId, getName, getType, isGlobal, setContext, setData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaManager.TransactionCommand

protected JavaManager.TransactionCommand(java.net.URL url)
Constructs a new EditCommand for editing the specified Document using the provided Edit instance. The origin is used in the UpdateMessage sent, so that Addins can identify which UpdateMessages originated from themselves. This transaction is not undoable.


JavaManager.TransactionCommand

protected JavaManager.TransactionCommand(javax.swing.undo.UndoableEdit undoableEdit,
                                         java.net.URL url,
                                         TransactionDescriptor descriptor)
Constructs a new EditCommand for editing the specified Document using the provided Edit instance. The origin is used in the UpdateMessage sent, so that Addins can identify which UpdateMessages originated from themselves. This transaction is undoable.

Method Detail

doit

public final int doit()
               throws java.lang.Exception
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 class Command
Returns:
OK if the command completes successfully, CANCEL otherwise
Throws:
java.lang.Exception

undo

public final int undo()
               throws java.lang.Exception
Called by the CommandProcessor to undo a command When a command executes successfully, implementations should return OK, otherwise, return CANCEL or any other non-zero value.

Overrides:
undo in class Command
Returns:
OK if the command completes successfully, CANCEL otherwise
Throws:
java.lang.Exception

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-03

Copyright © 1997, 2009, Oracle. All rights reserved.