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
resourceDescription.recordStateFromHistory(resourceToDelete,
					new SubProgressMonitor(monitor, 1));
			monitor.done();
		}
		return resourceDescription;
	}
	/*
	 * Copy the content of the specified resource to the existing resource,
	 * returning a ResourceDescription that can be used to restore the original
	 * content. Do nothing if the resources are not files.
	 */
	private static ResourceDescription copyOverExistingResource(
			IResource source, IResource existing, IProgressMonitor monitor,
			IAdaptable uiInfo, boolean deleteSourceFile) throws CoreException {
		if (!(source instanceof IFile && existing instanceof IFile)) {
			return null;
		}
		IFile file = (IFile) source;
		IFile existingFile = (IFile) existing;
		monitor
				.beginTask(
						UndoMessages.AbstractResourcesOperation_CopyingResourcesProgress,
						3);
		if (file != null && existingFile != null) {
			if (validateEdit(file, existingFile, getShell(uiInfo))) {
				
				
				FileDescription fileDescription = new FileDescription(
						existingFile);