Bug 17618 Changing output location should delete all derived resources
F1 1) create a project (autobuild on) 2) import Java sources and resources 3) change output folder to project/bin ->all class files are removed (fine) 4) change output folder back to be the project -> all class files are removed (fine) 5) open project/bin -> all resources are still there Note: When opening the properties dialog on such a resource it is tagged as "Derived". Thus, it should be possible to remove all derived resources as long as they have been created by the Java builder.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/BuildPathsBlock.java
private List getDefaultClassPath(IJavaProject jproj) {
		List list= new ArrayList();
		IResource srcFolder;
		if (JavaBasePreferencePage.useSrcAndBinFolders()) {
			String sourceFolderName= JavaBasePreferencePage.getSourceFolderName();
			srcFolder= jproj.getProject().getFolder(sourceFolderName);
		} else {
			srcFolder= jproj.getProject();
		}
		list.add(new CPListElement(jproj, IClasspathEntry.CPE_SOURCE, srcFolder.getFullPath(), srcFolder));
		IPath libPath= new Path(JavaRuntime.JRELIB_VARIABLE);
		IPath attachPath= new Path(JavaRuntime.JRESRC_VARIABLE);
		IPath attachRoot= new Path(JavaRuntime.JRESRCROOT_VARIABLE);
		CPListElement elem= new CPListElement(jproj, IClasspathEntry.CPE_VARIABLE, libPath, null, attachPath, attachRoot, false);
		list.add(elem);
		return list;
	}
	
	private IPath getDefaultBuildPath(IJavaProject jproj) {
		if (JavaBasePreferencePage.useSrcAndBinFolders()) {
			String outputLocationName= JavaBasePreferencePage.getOutputLocationName();
			return jproj.getProject().getFullPath().append(outputLocationName);
		} else {
			return jproj.getProject().getFullPath();
		}
	}	
		
	private class BuildPathAdapter implements IStringButtonAdapter, IDialogFieldListener {