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/ui/actions/CustomFiltersActionGroup.java
}
		fUserDefinedPatterns= (String[])userDefinedPatterns.toArray(new String[userDefinedPatterns.size()]);
		setUserDefinedPatternsEnabled(fUserDefinedPatternsEnabled && fUserDefinedPatterns.length > 0);
	}
	private FilterDescriptor[] getCachedFilterDescriptors() {
		if (fCachedFilterDescriptors == null)
			fCachedFilterDescriptors= FilterDescriptor.getFilterDescriptors(fTargetId);
		return fCachedFilterDescriptors;
	}
	
	
	private void openDialog() {
		CustomFiltersDialog dialog= new CustomFiltersDialog(
			fViewer.getControl().getShell(),
			fTargetId,
			areUserDefinedPatternsEnabled(),
			fUserDefinedPatterns,
			getEnabledFilterIds());
		
		if (dialog.open() == Window.OK) {
			setEnabledFilterIds(dialog.getEnabledFilterIds());
			setUserDefinedPatternsEnabled(dialog.areUserDefinedPatternsEnabled());
			setUserDefinedPatterns(dialog.getUserDefinedPatterns());
			setRecentlyChangedFilters(dialog.getFilterDescriptorChangeHistory());
			storeViewDefaults();
			updateViewerFilters(true);
		}
	}
}