EGF Engine
Release 0.1.0

org.eclipse.egf.pattern.ui.editor.page
Class PatternSpecificationPage.ParameterNameValidator

java.lang.Object
  extended by org.eclipse.egf.pattern.ui.editor.page.AbstractPatternPage.TextValidator
      extended by org.eclipse.egf.pattern.ui.editor.page.PatternSpecificationPage.ParameterNameValidator
All Implemented Interfaces:
IPatternModificationListener
Enclosing class:
PatternSpecificationPage

protected class PatternSpecificationPage.ParameterNameValidator
extends AbstractPatternPage.TextValidator
implements IPatternModificationListener

Parameter name validator.


Field Summary
protected static String ERROR_KEY_NOT_UNIQUE_NAME
          ERROR KEY : name is already in use.
 
Fields inherited from class org.eclipse.egf.pattern.ui.editor.page.AbstractPatternPage.TextValidator
ERROR_KEY_REG_EXP
 
Constructor Summary
protected PatternSpecificationPage.ParameterNameValidator(Control control_p, ParameterRelation currentParameter_p)
          Constructor.
 
Method Summary
protected  String getErrorMessageFor(String errorKey_p, String value_p)
          Get error message for given error key and erroneous value.
 void notifyChanged(IPatternModificationNotification notification_p)
          Notify that a change to the pattern model has occurred.
protected  boolean onError(String text_p)
          On error condition for current textual value.
 
Methods inherited from class org.eclipse.egf.pattern.ui.editor.page.AbstractPatternPage.TextValidator
addErrorKey, getControl, handleValueChange, setRegularExpression
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_KEY_NOT_UNIQUE_NAME

protected static final String ERROR_KEY_NOT_UNIQUE_NAME
ERROR KEY : name is already in use.

See Also:
Constant Field Values
Constructor Detail

PatternSpecificationPage.ParameterNameValidator

protected PatternSpecificationPage.ParameterNameValidator(Control control_p,
                                                          ParameterRelation currentParameter_p)
Constructor.

Parameters:
control_p -
currentParameter_p -
Method Detail

onError

protected boolean onError(String text_p)
Description copied from class: AbstractPatternPage.TextValidator
On error condition for current textual value.
Default implementation is testing the new value against set regular expression.
If no regular expression has been set, always returns true.

Overrides:
onError in class AbstractPatternPage.TextValidator
Parameters:
text_p - the new textual value.
Returns:
true if on error, false otherwise.
See Also:
AbstractPatternPage.TextValidator.onError(java.lang.String)

getErrorMessageFor

protected String getErrorMessageFor(String errorKey_p,
                                    String value_p)
Description copied from class: AbstractPatternPage.TextValidator
Get error message for given error key and erroneous value.

Specified by:
getErrorMessageFor in class AbstractPatternPage.TextValidator
Returns:
See Also:
AbstractPatternPage.TextValidator.getErrorMessageFor(java.lang.String, java.lang.String)

notifyChanged

public void notifyChanged(IPatternModificationNotification notification_p)
Description copied from interface: IPatternModificationListener
Notify that a change to the pattern model has occurred.

Specified by:
notifyChanged in interface IPatternModificationListener
Parameters:
notification_p - a description of the change.
See Also:
IPatternModificationListener.notifyChanged(org.eclipse.egf.pattern.ui.internal.editor.IPatternModificationNotification)

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.