org.eclipse.gmf.runtime.lite.edit.parts.labels
Class MessageFormatLabelTextDisplayer
java.lang.Object
org.eclipse.gmf.runtime.lite.edit.parts.labels.AbstractLabelTextDisplayer
org.eclipse.gmf.runtime.lite.edit.parts.labels.AbstractFeatureBasedLabelTextDisplayer
org.eclipse.gmf.runtime.lite.edit.parts.labels.MessageFormatLabelTextDisplayer
- All Implemented Interfaces:
- ILabelTextDisplayer, org.eclipse.jface.viewers.ICellEditorValidator
- Direct Known Subclasses:
- SimpleLabelTextDisplayer
public class MessageFormatLabelTextDisplayer
- extends AbstractFeatureBasedLabelTextDisplayer
An implementation of ILabelTextDisplayer
that is based on a format
and
a number of structural features
of the source object.
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 |
MessageFormatLabelTextDisplayer
public MessageFormatLabelTextDisplayer(String viewPattern,
org.eclipse.emf.ecore.EStructuralFeature... features)
MessageFormatLabelTextDisplayer
public MessageFormatLabelTextDisplayer(String viewPattern,
String editorPattern,
org.eclipse.emf.ecore.EStructuralFeature... features)
MessageFormatLabelTextDisplayer
public MessageFormatLabelTextDisplayer(String viewPattern,
String editorPattern,
String editPattern,
org.eclipse.emf.ecore.EStructuralFeature... features)
getViewPatternProcessor
protected final MessageFormat getViewPatternProcessor()
createViewPatternProcessor
protected MessageFormat createViewPatternProcessor(String viewPattern)
getEditPatternProcessor
protected final MessageFormat getEditPatternProcessor()
createEditPatternProcessor
protected MessageFormat createEditPatternProcessor(String editPattern)
getEditorPatternProcessor
protected final MessageFormat getEditorPatternProcessor()
createEditorPatternProcessor
protected MessageFormat createEditorPatternProcessor(String editorPattern)
adjustPattern
protected String adjustPattern(String pattern)
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 newValue)
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.
buildTextByPattern
protected String buildTextByPattern(Object[] featureValues,
MessageFormat format)
Copyright © 2012. All Rights Reserved.