| <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> |
| <html> |
| |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| <title>Package-level Javadoc</title> |
| </head> |
| |
| <body> |
| APIs that provide undo and redo behavior for operations that manipulate |
| the workspace. |
| <h2>Package Specification</h2> |
| This package contains APIs for the Eclipse Platform User Interface that |
| support the undo and redo of operations that manipulate the workspace. |
| Undoable operations that create, delete, move, and copy resources are |
| provided. |
| <p> |
| The typical usage pattern is that a client creates one of the concrete operations |
| and executes it using the platform operation history. For example, the following |
| snippet deletes the project "Blort" without deleting its contents, and adds it |
| to the operation history so that it can be undone and redone. |
| </p> |
| <pre> |
| IProject project = getWorkspace().getRoot().getProject("Blort"); |
| // assume that getMonitor() returns a suitable progress monitor |
| project.create(getMonitor()); |
| project.open(getMonitor()); |
| DeleteResourcesOperation op = new DeleteResourcesOperation( |
| new IResource[] { project }, "Delete Project Blort", false); |
| PlatformUI.getWorkbench().getOperationSupport() |
| .getOperationHistory().execute(operation, getMonitor(), null); |
| </pre> |
| |
| </body> |
| |
| </html> |