org.eclipse.gmf.runtime.lite.edit.parts.labels
Class RegexpParser

java.lang.Object
  extended by org.eclipse.gmf.runtime.lite.edit.parts.labels.AbstractLabelTextDisplayer
      extended by org.eclipse.gmf.runtime.lite.edit.parts.labels.AbstractFeatureBasedLabelTextDisplayer
          extended by org.eclipse.gmf.runtime.lite.edit.parts.labels.RegexpParser
All Implemented Interfaces:
ILabelTextDisplayer, org.eclipse.jface.viewers.ICellEditorValidator

public class RegexpParser
extends AbstractFeatureBasedLabelTextDisplayer

Write-only label text displayer. Does not display any values, but is able to parse a given string.


Field Summary
 
Fields inherited from class org.eclipse.gmf.runtime.lite.edit.parts.labels.AbstractFeatureBasedLabelTextDisplayer
EMPTY_STRING
 
Constructor Summary
RegexpParser(String editPattern, org.eclipse.emf.ecore.EStructuralFeature... features)
           
 
Method Summary
protected  String adjustPattern(String pattern)
           
protected  String buildDisplayText(Object[] featureValues)
          Returns the text to be displayed by this label processor for the given values.
protected  String buildEditText(Object[] featureValues)
          Returns the initial edit text to be displayed by this label processor for the given values.
protected  Object[] parseEditedValues(String newString)
          Returns the values that should be set to the corresponding features.
 
Methods inherited from class org.eclipse.gmf.runtime.lite.edit.parts.labels.AbstractFeatureBasedLabelTextDisplayer
getApplyCommand, getDisplayText, getEditText, getFeatures, getValidator, getValidNewValue, getValidValue, getValues, isAffectingEvent, isValid, shouldReplaceEmptyStringsWithNulls
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexpParser

public RegexpParser(String editPattern,
                    org.eclipse.emf.ecore.EStructuralFeature... features)
Method Detail

buildDisplayText

protected String buildDisplayText(Object[] featureValues)
Description copied from class: AbstractFeatureBasedLabelTextDisplayer
Returns the text to be displayed by this label processor for the given values.

Specified by:
buildDisplayText in class AbstractFeatureBasedLabelTextDisplayer

buildEditText

protected String buildEditText(Object[] featureValues)
Description copied from class: AbstractFeatureBasedLabelTextDisplayer
Returns the initial edit text to be displayed by this label processor for the given values.

Specified by:
buildEditText in class AbstractFeatureBasedLabelTextDisplayer

parseEditedValues

protected Object[] parseEditedValues(String newString)
                              throws IllegalArgumentException
Description copied from class: AbstractFeatureBasedLabelTextDisplayer
Returns the values that should be set to the corresponding features.

Specified by:
parseEditedValues in class AbstractFeatureBasedLabelTextDisplayer
Throws:
IllegalArgumentException - If the given string is invalid.

adjustPattern

protected String adjustPattern(String pattern)


Copyright © 2012. All Rights Reserved.