Bug 250125 createExistentResourceFromHandle forgets to create children resources
Problem: The method FolderDescription#createExistentResourceFromHandle(IResource,IProgressMonitor) checks if the folder already exists and returns immediately if so. In cases where the FolderDescription has members which are not existing at that moment, that members will not be created. Use case: Assume you want to create a folder and a file in that folder and use two operations for this. I know it is not necessary to use two operations but my configuration is more complex than this example code. IFolder folder = ... // must not exist CreateFolderOperation op1 = new CreateFolderOperation(folder,...); IFile file = folder.getFile(...); // must not exist CreateFileOperation op1 = new CreateFileOperation(file,...); op1.execute(...); op2.execute(...); The execution of the op2 does not create the file because as stated above createExistentResourceFromHandle returns immediately because the parent folder of the file was created by op1. IMHO createExistentResourceFromHandle must check if members of a FolderDescription should be created.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractResourcesOperation.java
}
	/**
	 * Compute the status for deleting resources. A status severity of
	 * <code>OK</code> indicates that the delete 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 deletion of a resource, or when
	 * a create or delete operation is being undone or redone. Therefore, this
	 * method should check conditions that can change over the life of the
	 * operation, such as the existence of the resources to be deleted. One-time
	 * static checks should typically be done by the caller (such as the action
	 * that creates the operation) so that the user is not continually prompted
	 * or warned about conditions that were acceptable at the time of original
	 * execution.
	 */
	protected IStatus computeDeleteStatus() {
		if (resources == null || resources.length == 0) {
			markInvalid();
			return getErrorStatus(UndoMessages.AbstractResourcesOperation_NotEnoughInfo);
		}
		if (!resourcesExist()) {
			markInvalid();
			return getErrorStatus(UndoMessages.AbstractResourcesOperation_ResourcesDoNotExist);
		}
		return checkReadOnlyResources(resources);
	}
	/**
	 * Check the specified resources for read only state, and return a status