Bug 6009 New class wizard doesn't get context right for nested classes
Build 20011106. - with a .java file open in the editor, - click the new class button - check "Enclosing Type" - the field is blank - it should default to the current type in the editor
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/JavaModelUtil.java
* @param member The member to test the visibility for
	 * @param pack The package in focus
	 */
	public static boolean isVisible(IMember member, IPackageFragment pack) throws JavaModelException {
		int otherflags= member.getFlags();
		
		if (Flags.isPublic(otherflags) || Flags.isProtected(otherflags)) {
			return true;
		} else if (Flags.isPrivate(otherflags)) {
			return false;
		}		
		
		IPackageFragment otherpack= (IPackageFragment) findParentOfKind(member, IJavaElement.PACKAGE_FRAGMENT);
		return (pack != null && pack.equals(otherpack));
	}
		
	/**
	 * Returns true if the element is on the build path of the given project
	 */	
	public static boolean isOnBuildPath(IJavaProject jproject, IJavaElement element) throws JavaModelException {
		IPath rootPath;
		if (element.getElementType() == IJavaElement.JAVA_PROJECT) {
			rootPath= ((IJavaProject)element).getProject().getFullPath();
		} else {
			IPackageFragmentRoot root= getPackageFragmentRoot(element);
			if (root == null) {
				return false;
			}
			rootPath= root.getPath();
		}