|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.ui.views.navigator.ResourceSelectionUtil
Provides utilities for checking the validity of selections.
This class provides static methods only; it is not intended to be instantiated or subclassed.
Method Summary | |
static IStructuredSelection |
allResources(IStructuredSelection selection,
int resourceMask)
Returns the selection adapted to IResource. |
static boolean |
allResourcesAreOfType(IStructuredSelection selection,
int resourceMask)
Returns whether the types of the resources in the given selection are among the specified resource types. |
static boolean |
resourceIsType(IResource resource,
int resourceMask)
Returns whether the type of the given resource is among the specified resource types. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static boolean allResourcesAreOfType(IStructuredSelection selection, int resourceMask)
selection
- the selectionresourceMask
- resource mask formed by bitwise OR of resource type
constants (defined on IResource
)true
if all selected elements are resources of the right
type, and false
if at least one element is either a resource
of some other type or a non-resourceIResource.getType()
public static IStructuredSelection allResources(IStructuredSelection selection, int resourceMask)
selection
- the selectionresourceMask
- resource mask formed by bitwise OR of resource type
constants (defined on IResource
)IResource.getType()
public static boolean resourceIsType(IResource resource, int resourceMask)
resource
- the resourceresourceMask
- resource mask formed by bitwise OR of resource type
constants (defined on IResource
)true
if the resources has a matching type, and
false
otherwiseIResource.getType()
|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |