Package org.eclipse.ui.ide
Class ResourceSelectionUtil
java.lang.Object
org.eclipse.ui.ide.ResourceSelectionUtil
Provides utilities for checking the validity of selections.
 
This class provides static methods only; it is not intended to be instantiated or subclassed.
- Since:
- 3.6
- 
Method SummaryModifier and TypeMethodDescriptionstatic IStructuredSelectionallResources(IStructuredSelection selection, int resourceMask) Returns the selection adapted to IResource.static booleanallResourcesAreOfType(IStructuredSelection selection, int resourceMask) Returns whether the types of the resources in the given selection are among the specified resource types.static booleanresourceIsType(IResource resource, int resourceMask) Returns whether the type of the given resource is among the specified resource types.
- 
Method Details- 
allResourcesAreOfTypeReturns whether the types of the resources in the given selection are among the specified resource types.- Parameters:
- selection- the selection
- resourceMask- resource mask formed by bitwise OR of resource type constants (defined on- IResource)
- Returns:
- trueif all selected elements are resources of the right type, and- falseif at least one element is either a resource of some other type or a non-resource
- See Also:
 
- 
allResourcesReturns the selection adapted to IResource. Returns null if any of the entries are not adaptable.- Parameters:
- selection- the selection
- resourceMask- resource mask formed by bitwise OR of resource type constants (defined on- IResource)
- Returns:
- IStructuredSelection or null if any of the entries are not adaptable.
- See Also:
 
- 
resourceIsTypeReturns whether the type of the given resource is among the specified resource types.- Parameters:
- resource- the resource
- resourceMask- resource mask formed by bitwise OR of resource type constants (defined on- IResource)
- Returns:
- trueif the resources has a matching type, and- falseotherwise
- See Also:
 
 
-