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
String title= NewWizardMessages.NewSourceFolderWizardPage_ChooseExistingRootDialog_title; 
			String message= NewWizardMessages.NewSourceFolderWizardPage_ChooseExistingRootDialog_description; 
			IFolder folder= chooseFolder(title, message, initialPath);
			if (folder != null) {
				setFolderDialogText(folder.getFullPath());
			}
		} 
	}
	private void setFolderDialogText(IPath path) {
		IPath shortPath= path.removeFirstSegments(1);
		fRootDialogField.setText(shortPath.toString());
	}	
	
	protected void packRootDialogFieldChanged(DialogField field) {
		StatusInfo status= updateRootStatus();
		updateStatus(new IStatus[] {status});
	}
	private StatusInfo updateRootStatus() {		
		IJavaProject javaProject= fNewElement.getJavaProject();		
		IProject project= javaProject.getProject();
		
		StatusInfo pathNameStatus= validatePathName(fRootDialogField.getText(), project);
		
		if (!pathNameStatus.isOK())
			return pathNameStatus;
		
		StatusInfo result= new StatusInfo();
		result.setOK();
		IPath projPath= project.getFullPath();	
		IPath path= projPath.append(fRootDialogField.getText());