IStatus locationStatus= workspace.validateLinkLocation(fNewElement.getJavaProject().getProject().getFolder(new Path(folderName)), path);
IFolder folder= fNewElement.getJavaProject().getProject().getFolder(new Path(folderName)); IStatus locationStatus= workspace.validateLinkLocation(folder, path);
	private IStatus validateLinkLocation(String folderName) {		IWorkspace workspace= JavaPlugin.getWorkspace();		IPath path= Path.fromOSString(fLinkFields.fLinkLocation.getText());		IStatus locationStatus= workspace.validateLinkLocation(fNewElement.getJavaProject().getProject().getFolder(new Path(folderName)), path);		if (locationStatus.matches(IStatus.ERROR))			return locationStatus;				IPathVariableManager pathVariableManager = ResourcesPlugin.getWorkspace().getPathVariableManager();		IPath path1= Path.fromOSString(fLinkFields.fLinkLocation.getText());		IPath resolvedPath= pathVariableManager.resolvePath(path1);		// use the resolved link target name		String resolvedLinkTarget= resolvedPath.toOSString();				path= new Path(resolvedLinkTarget);		File linkTargetFile= new Path(resolvedLinkTarget).toFile();		if (linkTargetFile.exists()) {			if (!linkTargetFile.isDirectory())	            return new StatusInfo(IStatus.ERROR, NewWizardMessages.NewFolderDialog_linkTargetNotFolder); 		} else {			return new StatusInfo(IStatus.ERROR, NewWizardMessages.NewFolderDialog_linkTargetNonExistent);		}		if (locationStatus.isOK()) {			return new StatusInfo();		}		return new StatusInfo(locationStatus.getSeverity(), locationStatus.getMessage());	}