Bug 305114 [CommonNavigator] ResourceSelectionUtil has been deprecated without public replacement
Public API class org.eclipse.ui.views.navigator.ResourceSelectionUtil has been deprecated in 3.5 with the hint to "use the Common Navigator Framework classes instead", but the CNF counterpart is internal.
bundles/org.eclipse.ui.navigator.resources/src/org/eclipse/ui/internal/navigator/resources/actions/ResourceSelectionUtil.java
if (next instanceof IAdaptable) {
                Object resource = ((IAdaptable) next)
                        .getAdapter(IResource.class);
                if (resource == null) {
					return null;
				} else if (resourceIsType((IResource) resource, resourceMask)) {
					result.add(resource);
				}
            } else {
				return null;
			}
        }
        return new StructuredSelection(result);
    }
    /**
     * Returns whether the type of the given resource is among the specified 
     * resource types.
     * 
     * @param resource the resource
     * @param resourceMask resource mask formed by bitwise OR of resource type
     *   constants (defined on <code>IResource</code>)
     * @return <code>true</code> if the resources has a matching type, and 
     *   <code>false</code> otherwise
     * @see IResource#getType()
     */
    public static boolean resourceIsType(IResource resource, int resourceMask) {
        return (resource.getType() & resourceMask) != 0;
    }
}