EGF Engine
Release 0.1.0

org.eclipse.egf.core.ui.internal.validators
Class PatternElementValidator

java.lang.Object
  extended by org.eclipse.egf.common.ui.toolkit.validators.AbstractValidator
      extended by org.eclipse.egf.common.ui.toolkit.validators.NotEmptyStringValidator
          extended by org.eclipse.egf.core.ui.internal.validators.PatternElementValidator
All Implemented Interfaces:
org.eclipse.egf.common.ui.toolkit.validators.IValidator

public class PatternElementValidator
extends org.eclipse.egf.common.ui.toolkit.validators.NotEmptyStringValidator

Implements a validator that checks AbstractPatternElement valid state.


Constructor Summary
PatternElementValidator(NamedModelElementWithId parent_p, AbstractPatternElement pattern_p, String errorMessage_p)
          Constructor.
 
Method Summary
 String isValid(Object value_p)
          Returns a string indicating whether the given value is valid; null means valid, and non-null means invalid, with the result being the error message to display to the end-user.
 
Methods inherited from class org.eclipse.egf.common.ui.toolkit.validators.AbstractValidator
getErrorMessage, setErrorMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternElementValidator

public PatternElementValidator(NamedModelElementWithId parent_p,
                               AbstractPatternElement pattern_p,
                               String errorMessage_p)
Constructor.

Parameters:
patternElement_p -
errorMessage_p -
Method Detail

isValid

public String isValid(Object value_p)
Description copied from interface: org.eclipse.egf.common.ui.toolkit.validators.IValidator
Returns a string indicating whether the given value is valid; null means valid, and non-null means invalid, with the result being the error message to display to the end-user.

It is the responsibility of the implementor to fully format the message before returning it.

Specified by:
isValid in interface org.eclipse.egf.common.ui.toolkit.validators.IValidator
Overrides:
isValid in class org.eclipse.egf.common.ui.toolkit.validators.NotEmptyStringValidator
Parameters:
value_p - the value to be validated
Returns:
the error message, or null indicating that the value is valid.
See Also:
NotEmptyStringValidator.isValid(java.lang.Object)

EGF Engine
Release 0.1.0

Copyright (c) Thales Corporate Services S.A.S, 2009.

This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.