Bug 68011 [java search] "Search the JRE System Libraries" looks like a local preference but behaves as a global one... [search]
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/FindDeclarationsInHierarchyAction.java
Class[] getValidTypes() {
		return new Class[] { IField.class, IMethod.class, ILocalVariable.class, ITypeParameter.class };
	}
	
	void init() {
		setText(SearchMessages.Search_FindHierarchyDeclarationsAction_label); 
		setToolTipText(SearchMessages.Search_FindHierarchyDeclarationsAction_tooltip); 
		setImageDescriptor(JavaPluginImages.DESC_OBJS_SEARCH_DECL);
		PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.FIND_DECLARATIONS_IN_HIERARCHY_ACTION);
	}
	
	IJavaSearchScope getScope(IJavaElement element) throws JavaModelException {
		IType type= getType(element);
		if (type != null)
			return SearchEngine.createHierarchyScope(type);
		else
			return super.getScope(type);
	}
	
	String getScopeDescription(IJavaElement element) {
		IType type= getType(element);
		String typeName= ""; 
		if (type != null)
			typeName= type.getElementName();
		return Messages.format(SearchMessages.HierarchyScope, new String[] {typeName}); 
	}
	
}