Bug 34156 new class wizard defaults to wrong project
20030307 1. new workspace 2. import org.apache.ant project as binary. 3. switch to java perspective. 4. use new project button to create project zzz 5. use new class button. Notice that the source holder is org.apache.ant. The gray-lighted element in the package explorer is zzz
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewContainerWizardPage.java
/**
	 * Creates the necessary controls (label, text field and browse button) to edit
	 * the source folder location. The method expects that the parent composite
	 * uses a <code>GridLayout</code> as its layout manager and that the
	 * grid layout has at least 3 columns.
	 * 
	 * @param parent the parent composite
	 * @param nColumns the number of columns to span. This number must be
	 *  greater or equal three
	 */
	protected void createContainerControls(Composite parent, int nColumns) {
		fContainerDialogField.doFillIntoGrid(parent, nColumns);
		LayoutUtil.setWidthHint(fContainerDialogField.getTextControl(null), getMaxFieldWidth());
	}
	/**
	 * Sets the focus to the source folder's text field.
	 */	
	protected void setFocusOnContainer() {
		fContainerDialogField.setFocus();
	}
	
	private class ContainerFieldAdapter implements IStringButtonAdapter, IDialogFieldListener {
		
		public void changeControlPressed(DialogField field) {
			containerChangeControlPressed(field);
		}
		
		
		public void dialogFieldChanged(DialogField field) {