Bug 310444 [LinkedResources] Drag and Drop dialogs not disabled when Linked Resources turned off
I20100425-2000 - on the 'Linked Resources' preference page, disable the checkbox => DND groups are still enabled (should be disabled) - click OK - drag a file from the OS to the Package Explorer, Resource Navigator,... => "File Operation" dialog is still shown (should not be shown and just make a copy). Selecting "Link to files" gives an error dialog after I clicked OK. Additional UI problems on the preference page: - groups don't use dialog font - missing vertical gap between checkbox and first DND group: The gap should have the same size as the gap between the second group and the "Path variables..." label. Currently, the visual clustering suggests that the checkbox only applies to the DND groups.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyFilesAndFoldersOperation.java
messageShell.getDisplay().syncExec(new Runnable() {
			public void run() {
				MessageDialog.openError(messageShell, getProblemsTitle(),
						message);
			}
		});
	}
	/**
	 * Returns the resource either casted to or adapted to an IFile.
	 * 
	 * @param resource
	 *            resource to cast/adapt
	 * @return the resource either casted to or adapted to an IFile.
	 *         <code>null</code> if the resource does not adapt to IFile
	 */
	protected IFile getFile(IResource resource) {
		if (resource instanceof IFile) {
			return (IFile) resource;
		}
		return (IFile) ((IAdaptable) resource).getAdapter(IFile.class);
	}
	/**
	 * Returns java.io.File objects for the given file names.
	 * 
	 * @param fileNames
	 *            files to return File object for.
	 * @return java.io.File objects for the given file names.
	 * @deprecated As of 3.3, this method is no longer in use anywhere in this
	 *             class and is only provided for backwards compatability with
	 *             subclasses of the receiver.