Bug 14421 Old .CLASS Files Are Not Deleted
When creating a project that does NOT use source folders (and does not use a bin directory for .class files) the .java and .class files are stored together in the Java package structure. When converting a project to use source folders (and the required bin directory for .class files), the old .class files stored in the Java package structure are NEVER DELETED by Eclipse. This is a bug for Eclipse 1.0 and 2.0. Since I use WSDD 4.0 (which is built on Eclipse 1.0), I've seen compilation errors due to the fact that the compiler/JDT is using old .class files rather than the new ones in the project's bin directory. I have not managed to reproduce the compile errors in build 20020416. But since the old .class files should have been deleted this is still a bug for the latest build.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/JavaCapabilityConfigurationPage.java
* @param project The java project.
	 * @param entries The default classpath entries or <code>null</code> to take the default
	 * @param path The folder to be taken as the default output path or <code>null</code> to take the default
	 * @return overrideExistingClasspath If set to true, an existing '.classpath' file is ignored. If set to <code>false</code>
	 * the default classpath is only used if no '.classpath' exists.
	 */
	public void init(IJavaProject jproject, IPath defaultOutputLocation, IClasspathEntry[] defaultEntries, boolean defaultsOverrideExistingClasspath) {
		if (!defaultsOverrideExistingClasspath && jproject.exists() && jproject.getProject().getFile(".classpath").exists()) { 
			defaultOutputLocation= null;
			defaultOutputLocation= null;
		}
		fBuildPathsBlock.init(jproject, defaultOutputLocation, defaultEntries);
		fJavaProject= jproject;
	}
	
	/* (non-Javadoc)
	 * @see WizardPage#createControl
	 */	
	public void createControl(Composite parent) {
		Control control= fBuildPathsBlock.createControl(parent);
		setControl(control);
		
		WorkbenchHelp.setHelp(control, IJavaHelpContextIds.NEW_JAVAPROJECT_WIZARD_PAGE);
	}
		
	/**
	 * Returns the currently configured output location. Note that the returned path must not be valid.
	 */
	public IPath getOutputLocation() {
		return fBuildPathsBlock.getOutputLocation();