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
/**
	 * Recreate any resources known by this operation. Store enough information
	 * to undo and redo the operation.
	 * 
	 * @param monitor
	 *            the progress monitor to use for the operation
	 * @param uiInfo
	 *            the IAdaptable (or <code>null</code>) provided by the
	 *            caller in order to supply UI information for prompting the
	 *            user if necessary. When this parameter is not
	 *            <code>null</code>, it contains an adapter for the
	 *            org.eclipse.swt.widgets.Shell.class
	 * @throws CoreException
	 *             propagates any CoreExceptions thrown from the resources API
	 */
	protected void recreate(IProgressMonitor monitor, IAdaptable uiInfo)
			throws CoreException {
		setTargetResources(WorkspaceUndoUtil.recreate(resourceDescriptions,
				monitor, uiInfo));
		setResourceDescriptions(new ResourceDescription[0]);
	}
	/**
	 * Compute the status for creating resources from the descriptions. A status
	 * severity of <code>OK</code> indicates that the create is likely to be
	 * successful. A status severity of <code>ERROR</code> indicates that the
	 * operation is no longer valid. Other status severities are open to
	 * interpretation by the caller.
	 * 
	 * Note this method may be called on initial creation of a resource, or when
	 * a create or delete operation is being undone or redone. Therefore, this