Skip navigation links
oracle.jdeveloper.java
Class JavaManager.TransactionCommand
java.lang.Object
oracle.ide.controller.Command
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.
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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.
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
Skip navigation links
Copyright © 1997, 2013, Oracle. All rights reserved.