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/internal/ide/undo/ResourceDescription.java
* @param monitor
	 *            the progress monitor to be used
	 * @throws CoreException
	 */
	public abstract void recordStateFromHistory(IResource resource,
			IProgressMonitor monitor) throws CoreException;
	/**
	 * Restore any saved attributed of the specified resource. This method is
	 * called after the existent resource represented by the receiver has been
	 * created.
	 * 
	 * @param resource
	 *            the newly created resource
	 * @throws CoreException
	 */
	protected void restoreResourceAttributes(IResource resource) throws CoreException {
		if (modificationStamp != IResource.NULL_STAMP) {
			resource.revertModificationStamp(modificationStamp);
		}
		if (localTimeStamp != IResource.NULL_STAMP) {
			resource.setLocalTimeStamp(localTimeStamp);
		}
		if (resourceAttributes != null) {
			resource.setResourceAttributes(resourceAttributes);
		}
		if (markerDescriptions != null) {
			for (int i = 0; i < markerDescriptions.length; i++) {
				markerDescriptions[i].resource = resource;
				markerDescriptions[i].createMarker();
			}