de.cau.cs.kieler.synccharts.text.kits.formatting
Class KitsKeywordSerializer

java.lang.Object
  extended by org.eclipse.xtext.parsetree.reconstr.impl.AbstractKeywordSerializer
      extended by org.eclipse.xtext.parsetree.reconstr.impl.KeywordSerializer
          extended by de.cau.cs.kieler.synccharts.text.kits.formatting.KitsKeywordSerializer
All Implemented Interfaces:
org.eclipse.xtext.parsetree.reconstr.ITokenSerializer, org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.IKeywordSerializer

public class KitsKeywordSerializer
extends org.eclipse.xtext.parsetree.reconstr.impl.KeywordSerializer

Customized ITokenSerializer.IKeywordSerializer. Realizes the suppression of the keyword 'region' and the related ':' if it is not needed. Behavior is realized by overriding the KeywordSerializer#serializeUnassignedKeyword(EObject, Keyword, AbstractNode) method, overriding the KeywordSerializer.isValid(EObject, Keyword, Object, org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.IErrorAcceptor) does not lead to the intended behavior.

Rating red

Nested Class Summary
 
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
 
Field Summary
 
Fields inherited from interface org.eclipse.xtext.parsetree.reconstr.ITokenSerializer
KEEP_VALUE_FROM_NODE_MODEL
 
Constructor Summary
KitsKeywordSerializer()
           
 
Method Summary
 String serializeUnassignedKeyword(EObject context, org.eclipse.xtext.Keyword keyword, org.eclipse.xtext.nodemodel.INode node)
           
 
Methods inherited from class org.eclipse.xtext.parsetree.reconstr.impl.KeywordSerializer
isValid
 
Methods inherited from class org.eclipse.xtext.parsetree.reconstr.impl.AbstractKeywordSerializer
equalsOrReplacesNode, equalsOrReplacesNode, serializeAssignedKeyword
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KitsKeywordSerializer

public KitsKeywordSerializer()
Method Detail

serializeUnassignedKeyword

public String serializeUnassignedKeyword(EObject context,
                                         org.eclipse.xtext.Keyword keyword,
                                         org.eclipse.xtext.nodemodel.INode node)
Specified by:
serializeUnassignedKeyword in interface org.eclipse.xtext.parsetree.reconstr.ITokenSerializer.IKeywordSerializer
Overrides:
serializeUnassignedKeyword in class org.eclipse.xtext.parsetree.reconstr.impl.AbstractKeywordSerializer