org.eclipse.cdt.internal.ui.dialogs
Class TypedElementSelectionValidator

java.lang.Object
  extended by 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.


Constructor Summary
TypedElementSelectionValidator(java.lang.Class[] acceptedTypes, boolean allowMultipleSelection)
           
TypedElementSelectionValidator(java.lang.Class[] acceptedTypes, boolean allowMultipleSelection, java.util.Collection rejectedElements)
           
 
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
 

Constructor Detail

TypedElementSelectionValidator

public TypedElementSelectionValidator(java.lang.Class[] acceptedTypes,
                                      boolean allowMultipleSelection)
Parameters:
acceptedTypes - The types accepted by the validator
allowMultipleSelection - 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 validator
allowMultipleSelection - If set to true, the validator allows multiple selection.
rejectedElements - A list of elements that are not accepted
Method Detail

validate

public org.eclipse.core.runtime.IStatus validate(java.lang.Object[] elements)
Specified by:
validate in interface org.eclipse.ui.dialogs.ISelectionStatusValidator