Package org.eclipse.ui.views.navigator
Class ResourceSelectionUtil
java.lang.Object
org.eclipse.ui.views.navigator.ResourceSelectionUtil
Deprecated, for removal: This API element is subject to removal in a future version.
Provides utilities for checking the validity of selections.
This class provides static methods only; it is not intended to be instantiated or subclassed.
- Since:
- 2.0
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be referenced by clients. Planned to be deleted, please see Bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=549953
- Restriction:
- This class is not intended to be instantiated by clients.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IStructuredSelection
allResources
(IStructuredSelection selection, int resourceMask) Deprecated, for removal: This API element is subject to removal in a future version.Returns the selection adapted to IResource.static boolean
allResourcesAreOfType
(IStructuredSelection selection, int resourceMask) Deprecated, for removal: This API element is subject to removal in a future version.Returns whether the types of the resources in the given selection are among the specified resource types.static boolean
resourceIsType
(IResource resource, int resourceMask) Deprecated, for removal: This API element is subject to removal in a future version.Returns whether the type of the given resource is among the specified resource types.
-
Method Details
-
allResourcesAreOfType
Deprecated, for removal: This API element is subject to removal in a future version.Returns whether the types of the resources in the given selection are among the specified resource types.- Parameters:
selection
- the selectionresourceMask
- resource mask formed by bitwise OR of resource type constants (defined onIResource
)- Returns:
true
if all selected elements are resources of the right type, andfalse
if at least one element is either a resource of some other type or a non-resource- See Also:
-
allResources
Deprecated, for removal: This API element is subject to removal in a future version.Returns the selection adapted to IResource. Returns null if any of the entries are not adaptable.- Parameters:
selection
- the selectionresourceMask
- resource mask formed by bitwise OR of resource type constants (defined onIResource
)- Returns:
- IStructuredSelection or null if any of the entries are not adaptable.
- See Also:
-
resourceIsType
Deprecated, for removal: This API element is subject to removal in a future version.Returns whether the type of the given resource is among the specified resource types.- Parameters:
resource
- the resourceresourceMask
- resource mask formed by bitwise OR of resource type constants (defined onIResource
)- Returns:
true
if the resources has a matching type, andfalse
otherwise- See Also:
-
ResourceSelectionUtil
instead.