Edit > Select Materials from Objects
 
 
 

Highlights all the node swatches from selected objects. For example, if you want to know which materials are used by objects A,B,C, you can first select objects A,B,C, then select this menu item to select materials related to A,B,C. Objects A,B,C will no longer be selected. The initial objects you selected can be a normal object or a group or faces of a polygon geometry.