org.eclipse.cdt.internal.ui.dialogs
Class TypedElementSelectionValidator
java.lang.Object
org.eclipse.cdt.internal.ui.dialogs.TypedElementSelectionValidator
- All Implemented Interfaces:
- org.eclipse.ui.dialogs.ISelectionStatusValidator
public class TypedElementSelectionValidator
- extends java.lang.Object
- implements org.eclipse.ui.dialogs.ISelectionStatusValidator
Implementation of a ISelectionValidator
to validate the
type of an element.
Empty selections are not accepted.
Method Summary |
org.eclipse.core.runtime.IStatus |
validate(java.lang.Object[] elements)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypedElementSelectionValidator
public TypedElementSelectionValidator(java.lang.Class[] acceptedTypes,
boolean allowMultipleSelection)
- Parameters:
acceptedTypes
- The types accepted by the validatorallowMultipleSelection
- If set to true
, the validator
allows multiple selection.
TypedElementSelectionValidator
public TypedElementSelectionValidator(java.lang.Class[] acceptedTypes,
boolean allowMultipleSelection,
java.util.Collection rejectedElements)
- Parameters:
acceptedTypes
- The types accepted by the validatorallowMultipleSelection
- If set to true
, the validator
allows multiple selection.rejectedElements
- A list of elements that are not accepted
validate
public org.eclipse.core.runtime.IStatus validate(java.lang.Object[] elements)
- Specified by:
validate
in interface org.eclipse.ui.dialogs.ISelectionStatusValidator