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
}
		
		handleFieldChanged(CONTAINER);
	}
	
	
			
	/**
	 * Called after the container field has changed.
	 * Updates the model and returns the status.
	 * Model is only valid if returned status is OK
	 */
	protected IStatus containerChanged() {
		StatusInfo status= new StatusInfo();
		
		fCurrRoot= null;
		String str= getPackageFragmentRootText();
		if (str.length() == 0) {
			status.setError(NewWizardMessages.getString("NewContainerWizardPage.error.EnterContainerName")); 
			return status;
		}
		IPath path= new Path(str);
		IResource res= fWorkspaceRoot.findMember(path);
		if (res != null) {
			int resType= res.getType();
			if (resType == IResource.PROJECT || resType == IResource.FOLDER) {
				IProject proj= res.getProject();
				if (!proj.isOpen()) {
					status.setError(NewWizardMessages.getFormattedString("NewContainerWizardPage.error.ProjectClosed", proj.getFullPath().toString())); 
					return status;