org.eclipse.xtext.generator
Class LineSeparatorHarmonizer

java.lang.Object
  extended by org.eclipse.xtext.generator.LineSeparatorHarmonizer
All Implemented Interfaces:
IFilePostProcessor
Direct Known Subclasses:
TraceAwarePostProcessor

@NonNullByDefault
public class LineSeparatorHarmonizer
extends java.lang.Object
implements IFilePostProcessor

Replaces all line breaks with the configured line separator.

Since:
2.3
Author:
Jan Koehnlein - Initial contribution and API

Constructor Summary
LineSeparatorHarmonizer()
           
 
Method Summary
protected  IWhitespaceInformationProvider getWhitespaceInformationProvider()
           
 java.lang.CharSequence postProcess(org.eclipse.emf.common.util.URI fileURI, java.lang.CharSequence content)
           
protected  java.lang.String replaceLineSeparators(java.lang.CharSequence content, java.lang.String newLineSeparator)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineSeparatorHarmonizer

public LineSeparatorHarmonizer()
Method Detail

postProcess

public java.lang.CharSequence postProcess(org.eclipse.emf.common.util.URI fileURI,
                                          java.lang.CharSequence content)
Specified by:
postProcess in interface IFilePostProcessor

replaceLineSeparators

protected java.lang.String replaceLineSeparators(java.lang.CharSequence content,
                                                 java.lang.String newLineSeparator)

getWhitespaceInformationProvider

protected IWhitespaceInformationProvider getWhitespaceInformationProvider()