Bug 31214 [Show in] Fails for Package Explorer in non-Java project
- create a simple project P - create a simple file called "x.java" in P - open it with the Default Text Editor - in the editor activate "Show in" and select Package Explorer as target -> nothing happens even if P and "x.java" are visible in the Package Explorer
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
fViewer.getControl().addKeyListener(new KeyAdapter() {
			public void keyReleased(KeyEvent event) {
				fActionSet.handleKeyEvent(event);
			}
		});
	}
	/**
	 * An editor has been activated.  Set the selection in this Packages Viewer
	 * to be the editor's input, if linking is enabled.
	 */
	void editorActivated(IEditorPart editor) {
		if (!isLinkingEnabled())  
			return;
		showInput(getElementOfInput(editor.getEditorInput()));
	}
	boolean showInput(Object input) {
		Object element= null;
			
		if (input instanceof IFile) 
			element= JavaCore.create((IFile)input);
				
		if (element == null) 
			element= input;
				
		if (element != null) {
			ISelection newSelection= new StructuredSelection(element);
			if (!fViewer.getSelection().equals(newSelection)) {
				try {
					fViewer.removeSelectionChangedListener(fSelectionListener);						
					fViewer.setSelection(newSelection);