|
Eclipse JDT Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An undo manager keeps track of performed changes. Use the method addUndo
to add change objects to the undo stack and performUndo
and
performRedo
to undo or redo changes.
This interface is not intended to be implemented by clients. Clients should use the
method RefactoringCore.getUndoManager()
to access the refactoring undo manager.
Method Summary | |
void |
aboutToPerformChange(Change change)
The infrastructure is going to perform the given change. |
void |
addListener(IUndoManagerListener listener)
Adds a listener to the undo manager. |
void |
addUndo(String name,
Change change)
Adds a new undo change to this undo manager. |
boolean |
anythingToRedo()
Returns true if there is anything to redo, otherwise
false . |
boolean |
anythingToUndo()
Returns true if there is anything to undo, otherwise
false . |
void |
changePerformed(Change change)
The infrastructure has performed the given change. |
void |
flush()
Flushes the undo manager's undo and redo stacks. |
String |
peekRedoName()
Returns the name of the top most redo. |
String |
peekUndoName()
Returns the name of the top most undo. |
void |
performRedo(IValidationCheckResultQuery query,
org.eclipse.core.runtime.IProgressMonitor pm)
Redo the top most redo change. |
void |
performUndo(IValidationCheckResultQuery query,
org.eclipse.core.runtime.IProgressMonitor pm)
Undo the top most undo change. |
void |
removeListener(IUndoManagerListener listener)
Removes the given listener from this undo manager. |
void |
shutdown()
Shut down the undo manager. |
Method Detail |
public void addListener(IUndoManagerListener listener)
listener
- the listener to be added to the undo managerpublic void removeListener(IUndoManagerListener listener)
listener
- the listener to be removedpublic void aboutToPerformChange(Change change)
change
- the change to be performed.public void changePerformed(Change change)
change
- the change that was performedpublic void addUndo(String name, Change change)
name
- the name presented on the undo stack for the provided
undo change. The name must be human readable.change
- the undo changepublic boolean anythingToUndo()
true
if there is anything to undo, otherwise
false
.
true
if there is anything to undo, otherwise
false
public String peekUndoName()
null
if there
aren't any changes to undo.public void performUndo(IValidationCheckResultQuery query, org.eclipse.core.runtime.IProgressMonitor pm) throws org.eclipse.core.runtime.CoreException
query
- a proceed query to decide how to proceed if the validation
checking of the undo change to perform returns a non OK status and the
status isn't a fatal error. If null
is passed in the the
undo proceeds if the status is not a fatal error.pm
- a progress monitor to report progress during performing
the undo change
org.eclipse.core.runtime.CoreException
- if performing the undo caused an exceptionpublic boolean anythingToRedo()
true
if there is anything to redo, otherwise
false
.
true
if there is anything to redo, otherwise
false
public String peekRedoName()
null
if there
are no any changes to redo.public void performRedo(IValidationCheckResultQuery query, org.eclipse.core.runtime.IProgressMonitor pm) throws org.eclipse.core.runtime.CoreException
query
- a proceed query to decide how to proceed if the validation
checking of the redo change to perform returns a non OK status. If
null
is passed in the the undo proceeds if the status
is not a fatal error.pm
- a progress monitor to report progress during performing
the redo change
org.eclipse.core.runtime.CoreException
- if performing the redo caused an exceptionpublic void flush()
public void shutdown()
|
Eclipse JDT Release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |