Package org.eclipse.ui.ide.undo


package org.eclipse.ui.ide.undo
APIs that provide undo and redo behavior for operations that manipulate the workspace.

Package Specification

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.

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.

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);
  • Classes
    Class
    Description
    An AbstractWorkspaceOperation represents an undoable operation that affects the workspace.
    A CopyProjectOperation represents an undoable operation for copying a project, also specifying the location of its contents.
    A CopyResourcesOperation represents an undoable operation for copying one or more resources in the workspace.
    A CreateFileOperation represents an undoable operation for creating a file in the workspace.
    A CreateFolderOperation represents an undoable operation for creating a folder in the workspace.
    A CreateMarkersOperation represents an undoable operation for creating one or more markers on one or more resources in the workspace.
    A CreateProjectOperation represents an undoable operation for creating a project in the workspace.
    A DeleteMarkersOperation represents an undoable operation for deleting one or more markers in the workspace.
    A DeleteResourcesOperation represents an undoable operation for deleting one or more resources in the workspace.
    A MoveProjectOperation represents an undoable operation for moving a project's content to a different location.
    A MoveResourcesOperation represents an undoable operation for moving one or more resources in the workspace.
    Deprecated.
    Replaced by IResourceSnapshot and ResourceSnapshotFactory in the org.eclipse.core.resources.undo.snapshot package
    An UpdateMarkersOperation represents an undoable operation for updating one or more markers in the workspace with one or more sets of attributes.
    WorkspaceUndoUtil defines common utility methods and constants used by clients who create undoable workspace operations.