org.eclipse.xtext.xtend2.conversion
Class AbstractRichTextValueConverter
java.lang.Object
org.eclipse.xtext.conversion.impl.AbstractValueConverter<T>
org.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter<java.lang.String>
org.eclipse.xtext.xtend2.conversion.AbstractRichTextValueConverter
- All Implemented Interfaces:
- IValueConverter<java.lang.String>, IValueConverter.RuleSpecific
- Direct Known Subclasses:
- RichTextEndValueConverter, RichTextInBetweenValueConverter, RichTextStartValueConverter, RichTextValueConverter
public abstract class AbstractRichTextValueConverter
- extends AbstractLexerBasedConverter<java.lang.String>
- Author:
- Sebastian Zarnekow - Initial contribution and API
Methods inherited from class org.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter |
assertTokens, createTokenContentMismatchException, createTokenTypeMismatchException, getLexer, getLexerProvider, getRule, getRuleName, getRuleName, getTokenDefMap, getTokenDefProvider, getTokenSource, setLexerProvider, setRule, setTokenDefProvider, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRichTextValueConverter
public AbstractRichTextValueConverter()
getLeadingTerminal
protected abstract java.lang.String getLeadingTerminal()
getTrailingTerminal
protected abstract java.lang.String getTrailingTerminal()
toEscapedString
protected java.lang.String toEscapedString(java.lang.String value)
- Overrides:
toEscapedString
in class AbstractLexerBasedConverter<java.lang.String>
assertValidValue
protected void assertValidValue(java.lang.String value)
- Overrides:
assertValidValue
in class AbstractLexerBasedConverter<java.lang.String>
getTrailingSubsequences
protected java.util.List<java.lang.String> getTrailingSubsequences()
addIfAbsent
protected void addIfAbsent(java.lang.String value,
java.util.Set<java.lang.String> set)
toValue
public java.lang.String toValue(java.lang.String string,
INode node)
- Description copied from interface:
IValueConverter
Creates a value from the given input. The input is conformant
to a data type or terminal rule.
The given string
or node
may be null but not both of them.
- Parameters:
string
- the string that was inferred from the node. Usually the node's text
but may be reduced to the parts of the node that are not
hidden
.node
- the parsed node including hidden parts.
- Returns:
- the new value or
null
.