Bug 18132 New wizards should verify if folder is on classpath
1. create J project 'P' with source folder setup (source folder 'src') 2. use new wizard to create a class ==> you can create a class inside 'P' or in a folder which is not on the classpath
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
protected void initContainerPage(IJavaElement elem) {
		IPackageFragmentRoot initRoot= null;
		if (elem != null) {
			initRoot= JavaModelUtil.getPackageFragmentRoot(elem);
			if (initRoot == null || initRoot.isArchive()) {
				IJavaProject jproject= elem.getJavaProject();
				try {
					initRoot= null;
					IPackageFragmentRoot[] roots= jproject.getPackageFragmentRoots();
					for (int i= 0; i < roots.length; i++) {
						if (roots[i].getKind() == IPackageFragmentRoot.K_SOURCE) {
							initRoot= roots[i];
							break;
						}
					}
				} catch (JavaModelException e) {
					JavaPlugin.log(e.getStatus());
				}
				if (initRoot == null) {
					initRoot= jproject.getPackageFragmentRoot(""); 
				}
			}
		}	
		setPackageFragmentRoot(initRoot, true);
	}
	
	/**
	 * Utility method to inspect a selection to find a Java element as initial element.
	 * @return Returns a Java element to use as initial selection, or <code>null</code>,
	 * if none is found.