Bug 21173 Can't create new Project because empty string in "New Project" Preference [2.0.1]
In the Java->New Project tab of Preferences I chose the folders radio button and leave the Source folder name empty, and the output location name to be "output". My intent is to have my source come off the main tree with an initial branch to be output. Like this: myProject (root) -- com -- ibm ... -- output -- com -- ibm ... Then when I try to create a New Java Project, I can enter a project name, but when I click Next nothing happnes, and when I'm forced to click Finish, I get an error message that reads: "An Error occured while creating the Java project. Path must include project and resource name." This bug is reproducible, but after I got to playing with the folder names, it went away when I setup the same conditions that caused it the first time. I just did a fresh extract of Eclipse (I'm using the final 2.0 release from June 28th) and was able to recreate it. So somehow by putting values in those fields and then taking them away, I've been able to make the bug go away. This bug may seem minor, but it's very frustrating and caused me to curse one of the mileston builds when I saw it (I didn't report it at the time because I thought I saw a bug that was to fix it). The correlation between a setting in the new project tab and actually creating a new project is quite small as I might set that tab up in the first week of using eclipse and not create a new project for weeks. Perhaps I'm misunderstanding the intent of those folder names, but I don't think I am. If I am, their intent should be better documented in the panel. If I'm correct as to their intent, then there is some wierd initial setting on the source folder name that is empty which later causes projects to not be created (with a confusing message to boot). This is my first bug submission to eclipse so my apologies if I've filed it on the wrong component.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
/**
	 * Initializes the classpath for the given project. Multiple calls to init are allowed,
	 * but all existing settings will be cleared and replace by the given or default paths.
	 * @param project The java project to configure. Does not have to exist.
	 * @param outputLocation The output location to be set in the page. If <code>null</code>
	 * is passed, jdt default settings are used, or - if the project is an existing Java project- the
	 * output location of the existing project 
	 * @param classpathEntries The classpath entries to be set in the page. If <code>null</code>
	 * is passed, jdt default settings are used, or - if the project is an existing Java project - the
	 * classpath entries of the existing project
	 */	
	public void init(IJavaProject jproject, IPath outputLocation, IClasspathEntry[] classpathEntries) {
		fCurrJProject= jproject;
		boolean projectExists= false;
		List newClassPath= null;
		try {
			IProject project= fCurrJProject.getProject();
			projectExists= (project.exists() && project.getFile(".classpath").exists()); 
			if  (projectExists) {
				if (outputLocation == null) {
					outputLocation=  fCurrJProject.getOutputLocation();
				}
				if (classpathEntries == null) {
					classpathEntries=  fCurrJProject.getRawClasspath();
				}
			}
			if (outputLocation == null) {
				outputLocation= getDefaultBuildPath(jproject);
			}			
			if (classpathEntries != null) {