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/src/org/eclipse/ui/internal/wizards/datatransfer/WizardFileSystemResourceImportPage1.java
private File getSourceDirectory(String path) {
        File sourceDirectory = new File(getSourceDirectoryName(path));
        if (!sourceDirectory.exists() || !sourceDirectory.isDirectory()) {
            return null;
        }
        return sourceDirectory;
    }
    /**
     *	Answer the directory name specified as being the import source.
     *	Note that if it ends with a separator then the separator is first
     *	removed so that java treats it as a proper directory
     */
    private String getSourceDirectoryName() {
        return getSourceDirectoryName(this.sourceNameField.getText());
    }
    /**
     *	Answer the directory name specified as being the import source.
     *	Note that if it ends with a separator then the separator is first
     *	removed so that java treats it as a proper directory
     */
    private String getSourceDirectoryName(String sourceName) {
        IPath result = new Path(sourceName.trim());
        if (result.getDevice() != null && result.segmentCount() == 0) {
			result = result.addTrailingSeparator();
		} else {
			result = result.removeTrailingSeparator();
		}
        return result.toOSString();
    }
    /**