Bug 131105 [EFS] CopyFilesAndFoldersOperation does not handle null locations
Stumbled on this problem when copying/moving resources between local and remote filesystems. Copying or moving a file from a project on a remote filesystem to a project on a local filesystem results in a source does not exist error; vice-versa produces a destination does not exist; nonlocal to nonlocal produces a destination does not exist. Partial stacktrace: MoveFilesAndFoldersOperation(CopyFilesAndFoldersOperation).validateDestinationLocation(IContainer) line: 1428 MoveFilesAndFoldersOperation(CopyFilesAndFoldersOperation).validateDestination(IContainer, IResource[]) line: 1357 MoveFilesAndFoldersOperation.validateDestination(IContainer, IResource[]) line: 217 ResourceNavigatorMoveAction(CopyResourceAction).isValid(Object) line: 166 ... Remark that all destination validation in these UI classes use IResource.getLocation() which is only usable for resources on the local filesystem. Because of this, it is impossible to seamlessly integrate local and nonlocal resources. I am using org.eclipse.ui.ide_3.2.0.I20060216-1200.jar but according to public CVS nothing has yet changed in the use of getLocation().
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java
* 
	 * @param stores
	 *            stores that are to be imported
	 * @param target
	 *            container to which the import will be done
	 * @param monitor
	 *            a progress monitor for showing progress and for cancelation
	 */
	private void performFileImport(IFileStore[] stores, IContainer target,
			IProgressMonitor monitor) {
		IOverwriteQuery query = new IOverwriteQuery() {
			public String queryOverwrite(String pathString) {
				if (alwaysOverwrite) {
					return ALL;
				}
				final String returnCode[] = { CANCEL };
				final String msg = NLS
						.bind(
								IDEWorkbenchMessages.CopyFilesAndFoldersOperation_overwriteQuestion,
								pathString);
				final String[] options = { IDialogConstants.YES_LABEL,
						IDialogConstants.YES_TO_ALL_LABEL,
						IDialogConstants.NO_LABEL,
						IDialogConstants.CANCEL_LABEL };
				messageShell.getDisplay().syncExec(new Runnable() {
					public void run() {
						MessageDialog dialog = new MessageDialog(
								messageShell,
								IDEWorkbenchMessages.CopyFilesAndFoldersOperation_question,
								null, msg, MessageDialog.QUESTION, options, 0);