Bug 220696 [Undo] When deleting files and externally moving files from navigator, we get an exception
Build ID: M20071023-1652 Steps To Reproduce: Delete files from navigator view. Copy files from another folder to workspace using an external shell like command on windows. Refresh workspace. Repeat More information: from time to time, you get this exception: An internal error occurred during: "Deleting resources". java.lang.ArrayIndexOutOfBoundsException: 2 at org.eclipse.ui.ide.undo.AbstractResourcesOperation.setTargetResources(AbstractResourcesOperation.java:323) at org.eclipse.ui.ide.undo.AbstractResourcesOperation.<init>(AbstractResourcesOperation.java:71) at org.eclipse.ui.ide.undo.DeleteResourcesOperation.<init>(DeleteResourcesOperation.java:53) at org.eclipse.ui.actions.DeleteResourceAction$4.run(DeleteResourceAction.java:503) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractResourcesOperation.java
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.MultiRule;
import org.eclipse.ui.actions.ReadOnlyStateChecker;
import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
import org.eclipse.ui.internal.ide.undo.UndoMessages;
/**
 * An AbstractResourcesOperation represents an undoable operation that
 * manipulates resources. It provides implementations for resource rename,
 * delete, creation, and modification. It also assigns the workspace undo
 * context as the undo context for operations of this type. Clients may call the
 * public API from a background thread.
 * 
 * This class is not intended to be subclassed by clients.
 * 
 * @since 3.3
 * 
 */
abstract class AbstractResourcesOperation extends AbstractWorkspaceOperation {
	/*
	 * The array of resource descriptions known by this operation to create or
	 * restore overwritten resources.
	 */
	protected ResourceDescription[] resourceDescriptions;
	/*
	 * Return true if the specified subResource is a descendant of the specified
	 * super resource. Used to remove descendants from the resource array when