Bug 13981 Show In Packages view not precise
Build 20020416 0. Set Package explorer preference to show members 1. Select a method in the Outline or Type Hierarchy view 2. Navigate -> Shwo in Packages View ==> CU is selected instead of method
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/actions/SelectionConverter.java
if (selection instanceof IStructuredSelection)
				return (IStructuredSelection)selection;
		}
		return StructuredSelection.EMPTY;
	}
	
	/**
	 * Converts the given structured selection into an array of Java elements.
	 * An empty array is returned if one of the elements stored in the structured
	 * selection is not of tupe <code>IJavaElement</code>
	 */
	public static IJavaElement[] getElements(IStructuredSelection selection) {
		if (!selection.isEmpty()) {
			IJavaElement[] result= new IJavaElement[selection.size()];
			int i= 0;
			for (Iterator iter= selection.iterator(); iter.hasNext(); i++) {
				Object element= (Object) iter.next();
				if (!(element instanceof IJavaElement))
					return EMPTY_RESULT;
				result[i]= (IJavaElement)element;
			}
			return result;
		}
		return EMPTY_RESULT;
	}
	
	/**
	 * Converts the text selection provided by the given editor into an array of
	 * Java elements. If the selection doesn't cover a Java element and the selection's
	 * length is greater than 0 the methods returns the editor's input element.