Bug 85385 New JProject wizard should check whether linked folders exist
I20050215-2300 The new source page on the New Java Project wizard allows to create linked folders to locations that don't exists. This leads to various problems and .log entries later.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/LinkFolderDialog.java
private IStatus validateLinkLocation(String name) {
			IWorkspace workspace= JavaPlugin.getWorkspace();
			IPath path= Path.fromOSString(fDependenciesGroup.getLinkTarget());
			IStatus locationStatus= workspace.validateLinkLocation(fContainer.getFolder(new Path(name)), path);
			if (locationStatus.matches(IStatus.ERROR))
				return locationStatus;
			
			String resolvedLinkTarget= resolveVariable();
			path= new Path(resolvedLinkTarget);
			File linkTargetFile= new Path(resolvedLinkTarget).toFile();
			if (linkTargetFile.exists()) {
				IStatus fileTypeStatus= validateFileType(linkTargetFile);
				if (!fileTypeStatus.isOK())
					return fileTypeStatus;
			} else
				if (locationStatus.isOK()) {
					
					return new StatusInfo(IStatus.WARNING, NewWizardMessages.getString("NewFolderDialog.linkTargetNonExistent"));  
				}
			if (locationStatus.isOK()) {
				return new StatusInfo();
			}
			return new StatusInfo(locationStatus.getSeverity(), locationStatus.getMessage());
		}
        
        /**
         * Validates the type of the given file against the link type specified
         * in the constructor.
         * 
         * @param linkTargetFile file to validate