Bug 185500 [Common Navigator] DND allows to Drop Projects on Projects but shows error
Build ID: I20070323-1616 Steps To Reproduce: 1. Select a Project in Project Explorer 2. Drag & Drop it on another project 3. Error Dialog is shown: Error message "Problems occurred moving the selected resources: Path for project must have only one segment. Path for project must have only one segment." More information: The original problem is that this is not handled correctly by CopyFilesAndFoldersOperation (e.g. MoveFilesAndFoldersOperation) .validateDestination(..) It only shows in the Project Explorer, as it allows dragging of Projects (other project viewers don't so they don't run into this). I've created a patch for this that simply checks in method "validateDrop" if a project is dropped on another resource and returns Status.ERROR.
bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/navigator/resources/ResourceDropAdapterAssistant.java
target.refreshLocal(IResource.DEPTH_ONE, null);
			} catch (CoreException e) {
			}
		}
		return Status.OK_STATUS;
	}
	/**
	 * Returns the actual target of the drop, given the resource under the
	 * mouse. If the mouse target is a file, then the drop actually occurs in
	 * its parent. If the drop location is before or after the mouse target and
	 * feedback is enabled, the target is also the parent.
	 */
	private IContainer getActualTarget(IResource mouseTarget) {
		
		if (mouseTarget.getType() == IResource.FILE) {
			return mouseTarget.getParent();
		}
		
		return (IContainer) mouseTarget;
	}
	/**
	 * Returns the resource selection from the LocalSelectionTransfer.
	 * 
	 * @return the resource selection from the LocalSelectionTransfer
	 */
	private IResource[] getSelectedResources() {
		ISelection selection = LocalSelectionTransfer.getTransfer()
				.getSelection();
		if (selection instanceof IStructuredSelection) {
			return getSelectedResources((IStructuredSelection)selection);