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
*/
	private IStatus validateTarget(Object target, TransferData transferType,
			int dropOperation) {
		if (!(target instanceof IResource)) {
			return WorkbenchNavigatorPlugin
					.createInfoStatus(WorkbenchNavigatorMessages.DropAdapter_targetMustBeResource);
		}
		IResource resource = (IResource) target;
		if (!resource.isAccessible()) {
			return WorkbenchNavigatorPlugin
					.createErrorStatus(WorkbenchNavigatorMessages.DropAdapter_canNotDropIntoClosedProject);
		}
		IContainer destination = getActualTarget(resource);
		if (destination.getType() == IResource.ROOT) {
			return WorkbenchNavigatorPlugin
					.createErrorStatus(WorkbenchNavigatorMessages.DropAdapter_resourcesCanNotBeSiblings);
		}
		String message = null;
		
		if (LocalSelectionTransfer.getTransfer().isSupportedType(transferType)) {
			IResource[] selectedResources = getSelectedResources();
			if (selectedResources.length == 0) {
				message = WorkbenchNavigatorMessages.DropAdapter_dropOperationErrorOther;
			} else {
				CopyFilesAndFoldersOperation operation;
				if (dropOperation == DND.DROP_COPY) {
					operation = new CopyFilesAndFoldersOperation(getShell());
				} else {
					operation = new MoveFilesAndFoldersOperation(getShell());
				}