blob: 52d29cba8af5b8046d514b9a60f30b23c8e632be [file] [log] [blame]
package org.eclipse.ui.dialogs;
/*
* (c) Copyright IBM Corp. 2000, 2001.
* All Rights Reserved.
*/
/**
* For validating selections in some selection dialogs.
* <p>
* Clients should implement this interface to define specialized selection
* validators.
* </p>
*
* @see ContainerSelectionDialog
*/
public interface ISelectionValidator {
/**
* Returns a string indicating whether the given selection is valid. If the
* result is <code>null</code>, the selection is considered to be valid; if the result is
* non-empty, it contains the error message to be displayed to the user.
*
* @param selection the selection to be validated
* @return the error message, or <code>null</code> indicating
* that the value is valid
*/
public String isValid(Object selection);
}