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
public void saveState(IMemento memento) {
		if (fViewer == null) {
			
			if (fMemento != null) 
				memento.putMemento(fMemento);
			return;
		}
		saveExpansionState(memento);
		saveSelectionState(memento);
		saveLayoutState(memento);
		saveLinkingEnabled(memento);
		
		
		fActionSet.saveFilterAndSorterState(memento);
	}
	
	private void saveLinkingEnabled(IMemento memento) {
		memento.putInteger(PreferenceConstants.LINK_PACKAGES_TO_EDITOR, fLinkingEnabled ? 1 : 0);
	}
	/**
	 * Saves the current layout state.
	 * 
	 * @param memento	the memento to save the state into or
	 * 					<code>null</code> to store the state in the preferences
	 * @since 2.1
	 */
	private void saveLayoutState(IMemento memento) {
		if (memento != null) {	
			memento.putInteger(TAG_LAYOUT, getLayoutAsInt());