Bug 9891 'show in packages view' - surprising behavior
in the editor, when there's no selection or the selection cannot be resolved - 'show in packages view' finds the cu in the packages view. when the selection resolves to sth - it shows the cu that declares the thing the selection resolves to. this is highly surprising - i do not pay any attention to the current selection when using this useful action. these 2 things are really 2 different action - that's how i see it.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/ShowInPackageViewAction.java
/* (non-Javadoc)
	 * Method declared on SelectionDispatchAction.
	 */
	protected void selectionChanged(ITextSelection selection) {
		setEnabled(fEditor != null);
	}
	/* (non-Javadoc)
	 * Method declared on SelectionDispatchAction.
	 */
	protected void selectionChanged(IStructuredSelection selection) {
		setEnabled(checkEnabled(selection));
	}
	
	private boolean checkEnabled(IStructuredSelection selection) {
		if (selection.size() != 1)
			return false;
		return selection.getFirstElement() instanceof IJavaElement;
	}
	
	/* (non-Javadoc)
	 * Method declared on SelectionDispatchAction.
	 */
	protected void run(ITextSelection selection) {
		IJavaElement element= SelectionConverter.codeResolveOrInputHandled(fEditor, getShell(), getDialogTitle(), ActionMessages.getString("ShowInPackageViewAction.select_name")); 
		if (element != null)
			run(element);
	}
	
	/* (non-Javadoc)
	 * Method declared on SelectionDispatchAction.