de.cau.cs.kieler.synccharts.text.kits.formatting
Class KitsValueSerializer
java.lang.Object
org.eclipse.xtext.parsetree.reconstr.impl.ValueSerializer
de.cau.cs.kieler.synccharts.text.kits.formatting.KitsValueSerializer
- All Implemented Interfaces:
- org.eclipse.xtext.parsetree.reconstr.ITokenSerializer, org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.IValueSerializer
public class KitsValueSerializer
- extends org.eclipse.xtext.parsetree.reconstr.impl.ValueSerializer
customized ITokenSerializer.IValueSerializer
.
Realizes the output of the optional keyword state and empty state labels.
Works hand-in-hand with KitsTransientValueService
.
- Rating

Nested classes/interfaces inherited from interface org.eclipse.xtext.parsetree.reconstr.ITokenSerializer |
org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.ICrossReferenceSerializer, org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.IEnumLiteralSerializer, org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.IErrorAcceptor, org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.IKeywordSerializer, org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.IValueSerializer |
Fields inherited from interface org.eclipse.xtext.parsetree.reconstr.ITokenSerializer |
KEEP_VALUE_FROM_NODE_MODEL |
Method Summary |
boolean |
isValid(EObject context,
org.eclipse.xtext.RuleCall ruleCall,
Object value,
org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.IErrorAcceptor errorAcceptor)
Decides whether a feature value of an EObject is valid to be serialized. |
String |
serializeAssignedValue(EObject context,
org.eclipse.xtext.RuleCall ruleCall,
Object value,
org.eclipse.xtext.parsetree.AbstractNode node)
Determines the output of the state labels. |
String |
serializeUnassignedValue(EObject context,
org.eclipse.xtext.RuleCall ruleCall,
org.eclipse.xtext.parsetree.AbstractNode node)
Customized Computation of serialized output fragments. |
Methods inherited from class org.eclipse.xtext.parsetree.reconstr.impl.ValueSerializer |
equalsOrReplacesNode, equalsOrReplacesNode, serialize, serializeUnassignedValueByRule, serializeUnassignedValueByRuleCall |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KitsValueSerializer
public KitsValueSerializer()
isValid
public boolean isValid(EObject context,
org.eclipse.xtext.RuleCall ruleCall,
Object value,
org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.IErrorAcceptor errorAcceptor)
- Decides whether a feature value of an EObject is valid to be serialized.
In case the assignment of a scope label is processed delegate to
KitsTransientValueService
, delegate to ValueSerializer
otherwise.
- Specified by:
isValid
in interface org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.IValueSerializer
- Overrides:
isValid
in class org.eclipse.xtext.parsetree.reconstr.impl.ValueSerializer
serializeAssignedValue
public String serializeAssignedValue(EObject context,
org.eclipse.xtext.RuleCall ruleCall,
Object value,
org.eclipse.xtext.parsetree.AbstractNode node)
- Determines the output of the state labels.
Distinguishes the empty labels, one word labels any multi word labels
- Specified by:
serializeAssignedValue
in interface org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.IValueSerializer
- Overrides:
serializeAssignedValue
in class org.eclipse.xtext.parsetree.reconstr.impl.ValueSerializer
serializeUnassignedValue
public String serializeUnassignedValue(EObject context,
org.eclipse.xtext.RuleCall ruleCall,
org.eclipse.xtext.parsetree.AbstractNode node)
- Customized Computation of serialized output fragments.
In particular, this serializes the keyword state, no matter it was mentioned in the source.
- Specified by:
serializeUnassignedValue
in interface org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.IValueSerializer
- Overrides:
serializeUnassignedValue
in class org.eclipse.xtext.parsetree.reconstr.impl.ValueSerializer