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
CoreUtility.createFolder((IFolder)res, true, true, null);
			}
			classpath[i]= entry.getClasspathEntry();
						
			
			URL javadocLocation= entry.getJavadocLocation();
			if (javadocLocation != null) {
				IPath path= entry.getPath();
				if (entry.getEntryKind() == IClasspathEntry.CPE_VARIABLE) {
					path= JavaCore.getResolvedVariablePath(path);
				}
				if (path != null) {
					JavaDocLocations.setLibraryJavadocLocation(path, javadocLocation);
				}
			}
		}	
		monitor.worked(1);
				
		fCurrJProject.setRawClasspath(classpath, outputLocation, new SubProgressMonitor(monitor, 7));		
	}
	
	public static boolean hasClassfiles(IResource resource) throws CoreException {
		if (resource.isDerived() && "class".equals(resource.getFileExtension())) { 
			return true;
		}		
		if (resource instanceof IContainer) {
			IResource[] members= ((IContainer) resource).members();
			for (int i= 0; i < members.length; i++) {
				if (hasClassfiles(members[i])) {
					return true;