Bug 18961 Adding new class creates class in wrong package in Java Browsing Perspective [browsing]
Hi, I'm working on a class in package A and want to create a class in package B in the Java Browsing perspective. I select package B in the Packages view go into the Types view, click the right mouse button and select New Class. The new class is created in package A instead of package B. Environment: Windows 2000 JSDK 1.4.0 Eclipse F2
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/typehierarchy/TypeHierarchyViewPart.java
}	
	
	private IType getSelectableType(IJavaElement elem) {
		ISelection sel= null;
		if (elem.getElementType() != IJavaElement.TYPE) {
			return (IType) getCurrentViewer().getTreeRootType();
		} else {
			return (IType) elem;
		}
	}
	
	private void internalSelectType(IMember elem, boolean reveal) {	
		TypeHierarchyViewer viewer= getCurrentViewer();
		viewer.removeSelectionChangedListener(fSelectionChangedListener);
		viewer.setSelection(elem != null ? new StructuredSelection(elem) : StructuredSelection.EMPTY, reveal);
		viewer.addSelectionChangedListener(fSelectionChangedListener);
	}
	
	private void internalSelectMember(IMember member) {
		fMethodsViewer.removeSelectionChangedListener(fSelectionChangedListener);
		fMethodsViewer.setSelection(member != null ? new StructuredSelection(member) : StructuredSelection.EMPTY);
		fMethodsViewer.addSelectionChangedListener(fSelectionChangedListener);
	}	
	
	/**
	 * When the input changed or the hierarchy pane becomes visible,
	 * <code>updateHierarchyViewer<code> brings up the correct view and refreshes
	 * the current tree
	 */
	private void updateHierarchyViewer() {