Bug 121981 [build path] Can add source folder without spezifing a name
Version: 3.2.0 Build id: I20051220-0800 Open the add source folder wizard (thourgh new project wizard, build path menu or build path propertie page). The next and finish button are enabled even though there is no name spezified yet. Clicking finish results in: java.lang.NullPointerException at org.eclipse.core.runtime.Path.isPrefixOf(Path.java:627) at org.eclipse.jdt.internal.ui.wizards.buildpaths.AddSourceFolderWizard.finishPage(AddSourceFolderWizard.java:89) at org.eclipse.jdt.internal.ui.wizards.NewElementWizard$2.run(NewElementWizard.java:117) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:720) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1714) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3949) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/AddSourceFolderWizardPage.java
}
				}
				element.setAttribute(CPListElement.INCLUSION, inclusion);
			}
		}
	}
	
	private static StatusInfo validatePathName(String str, IProject project) {
		StatusInfo result= new StatusInfo();
		result.setOK();
		IPath projPath= project.getFullPath();
		
		if (str.length() == 0) {
			result.setError(Messages.format(NewWizardMessages.NewSourceFolderWizardPage_error_EnterRootName, projPath.toString()));
			return result;
		}
		
		IPath path= projPath.append(str);
		IWorkspaceRoot workspaceRoot= ResourcesPlugin.getWorkspace().getRoot();
		IStatus validate= workspaceRoot.getWorkspace().validatePath(path.toString(), IResource.FOLDER);
		if (validate.matches(IStatus.ERROR)) {
			result.setError(Messages.format(NewWizardMessages.NewSourceFolderWizardPage_error_InvalidRootName, validate.getMessage())); 
			return result;
		}
			
		IResource res= workspaceRoot.findMember(path);
		if (res != null) {
			if (res.getType() != IResource.FOLDER) {
				result.setError(NewWizardMessages.NewSourceFolderWizardPage_error_NotAFolder); 
				return result;