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
elementMem.putString(TAG_PATH, ((IJavaElement) elements[i]).getHandleIdentifier());
			}
		}
	}
	protected void saveExpansionState(IMemento memento) {
		Object expandedElements[]= fViewer.getVisibleExpandedElements();
		if (expandedElements.length > 0) {
			IMemento expandedMem= memento.createChild(TAG_EXPANDED);
			for (int i= 0; i < expandedElements.length; i++) {
				IMemento elementMem= expandedMem.createChild(TAG_ELEMENT);
				
				Object o= expandedElements[i];
				if (o instanceof IJavaElement)
					elementMem.putString(TAG_PATH, ((IJavaElement) expandedElements[i]).getHandleIdentifier());
			}
		}
	}
	private void restoreFilterAndSorter() {
		fViewer.setSorter(new JavaElementSorter());
		if (fMemento != null)	
			fActionSet.restoreFilterAndSorterState(fMemento);
	}
	private void restoreUIState(IMemento memento) {
		restoreExpansionState(memento);
		restoreSelectionState(memento);
		
		
	}
	private void restoreLinkingEnabled(IMemento memento) {
		Integer val= memento.getInteger(PreferenceConstants.LINK_PACKAGES_TO_EDITOR);