Bug 267173 [Linked Resources] Data loss when replacing one linked resource with another using drag and drop
Build ID: HEAD Steps To Reproduce: I've got a Group with some links to folders. If I drag and drop a linked folder from another workspace path, into the group, I get the dialog saying: "project/group/linked_folder" already exists. Do you wish to overwrite? Folder contents will be merged existing files will be overwritten. In my case I had selected a bunch of linked resources to drag into the group, (some of which are identical to the links already in the group). So I pressed "Yes To All". The result is an error: "Resource is out of sync with the filesystem: ..." The move operation has actually tried to replace a file with itself, and this fails (and the resulting file is empty...). I find this completely counter-intuitive. If I'm replacing a linked resource with another, I don't want a recursive merge. I want to replace the link, just like aliases in a filesystem...
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/WorkspaceUndoUtil.java
*            created instead of files and folders (if createGroups is
	 *            false) when copied.
	 * @param relativeToVariable
	 *            a String that indicates relative to which variable linked
	 *            resources should be created, if createLinks is set to true.
	 *            Absolute linked resources will be created if null is passed
	 *            otherwise (and createLinks is set to true).
	 * @return an array of ResourceDescriptions describing any resources that
	 *         were overwritten by the copy operation
	 * @throws CoreException
	 *             propagates any CoreExceptions thrown from the resources API
	 */
	static ResourceDescription[] copy(IResource[] resources, IPath destination,
			List resourcesAtDestination, IProgressMonitor monitor,
			IAdaptable uiInfo, boolean pathIncludesName, boolean createVirtual,
			boolean createLinks, String relativeToVariable)
			throws CoreException {
		monitor.beginTask("", resources.length); 
		monitor
				.setTaskName(UndoMessages.AbstractResourcesOperation_CopyingResourcesProgress);
		List overwrittenResources = new ArrayList();
		for (int i = 0; i < resources.length; i++) {
			IResource source = resources[i];
			IPath destinationPath;
			if (pathIncludesName) {
				destinationPath = destination;
			} else {
				destinationPath = destination.append(source.getName());
			}
			IWorkspaceRoot workspaceRoot = getWorkspaceRoot();