Bug 166763 [Undo] API request: org.eclipse.ui.internal.ide.undo.ResourceDescription
I20061129-1340 To support undo for file operations in the Package Explorer, we need the functionality of org.eclipse.ui.internal.ide.undo.ResourceDescription. Could this class be promoted to API? I've copied the package for now (to avoid referencing internal code). We need more low-level operations than what's currently in org.eclipse.ui.ide.undo, because we must let jdt.core do the actual modifications and because our actions are refactorings with participants, which must adhere to the ltk.core.refactoring undo story.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java
status.getCode(), status.getMessage(), exception));
		}
		return multi;
	}
	/*
	 * Return the workspace.
	 */
	private static IWorkspace getWorkspace() {
		return ResourcesPlugin.getWorkspace();
	}
	/*
	 * Return the workspace root.
	 */
	private static IWorkspaceRoot getWorkspaceRoot() {
		return getWorkspace().getRoot();
	}
	/*
	 * Validate the destination file if it is read-only and additionally the
	 * source file if both are read-only. Returns true if both files could be
	 * made writeable.
	 */
	private static boolean validateEdit(IFile source, IFile destination,
			Shell shell) {
		if (destination.isReadOnly()) {
			IWorkspace workspace = WorkspaceUndoUtil.getWorkspace();
			IStatus status;
			if (source.isReadOnly()) {
				status = workspace.validateEdit(new IFile[] { source,
						destination }, shell);
			} else {