Bug 67814 Show In > Package Explorer doesn't ask for removal of last filter [package explorer]
200406180010; Not a dup of 66646. 'Show In > Package Explorer' doesn't ask for removal of a filter iff there's only a single filter set. Steps: - Disable all filters in Package Explorer, except for 'Referenced Libraries'. - Open editor for java.util.Vector - Navigate > Show In > Package Explorer => fails, doesn't ask for filter removal. Works iff at least one other filter (which would not filter the element) is active.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/packageview/PackageExplorerPart.java
}
		}
		restoreRootMode(fMemento);
		if (showWorkingSets()) {
			createWorkingSetModel();
		}
		restoreLayoutState(memento);
	}
    
    private String getSectionName() {
    	return "org.eclipse.jdt.ui.internal.packageExplorer"; 
    }
	private void restoreRootMode(IMemento memento) {
		if (memento != null) {
			Integer value= fMemento.getInteger(TAG_ROOT_MODE);
			fRootMode= value == null ? ViewActionGroup.SHOW_PROJECTS : value.intValue();
			if (fRootMode != ViewActionGroup.SHOW_PROJECTS && fRootMode != ViewActionGroup.SHOW_WORKING_SETS)
				fRootMode= ViewActionGroup.SHOW_PROJECTS;
		} else {
			fRootMode= ViewActionGroup.SHOW_PROJECTS;
		}
	}
	private void restoreLayoutState(IMemento memento) {
		Integer state= null;
		if (memento != null)
			state= memento.getInteger(TAG_LAYOUT);
		
		if(state == null) {
			IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
			state= new Integer(store.getInt(TAG_LAYOUT));