Bug 3975 New Class Wizard does not detect package if a resource is selected (1GFCU9G)
1. JUnit setup 2. Select ok.gif in junit.swingui 3. Open New Class wizard ==> package is default instead of junit.swingui (as if a class would have been selected) NOTES:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
fContainerStatus= new StatusInfo();
		fCurrRoot= null;
	}
			
	/**
	 * Initializes the fields provided by the container page with a given
	 * Java element as selection.
	 * @param elem The initial selection of this page or null if no
	 *             selection was available
	 */
	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("");