public class FormattingConfigBasedStream extends BaseTokenStream
| Modifier and Type | Class and Description |
|---|---|
protected class |
FormattingConfigBasedStream.Line |
protected class |
FormattingConfigBasedStream.LineEntry |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Set<AbstractFormattingConfig.ElementLocator> |
activeRangeLocators |
protected FormattingConfig |
cfg |
protected FormattingConfigBasedStream.Line |
currentLine |
protected IHiddenTokenHelper |
hiddenTokenHelper |
protected int |
indentationLevel |
protected java.lang.String |
indentationPrefix |
protected org.eclipse.emf.ecore.EObject |
last |
protected IElementMatcherProvider.IElementMatcher<AbstractFormattingConfig.ElementPattern> |
matcher |
protected java.lang.String |
preservedWS |
protected boolean |
preserveSpaces |
out| Constructor and Description |
|---|
FormattingConfigBasedStream(ITokenStream out,
java.lang.String initialIndentation,
FormattingConfig cfg,
IElementMatcherProvider.IElementMatcher<AbstractFormattingConfig.ElementPattern> matcher,
IHiddenTokenHelper hiddenTokenHelper,
boolean preserveSpaces) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addLineEntry(org.eclipse.emf.ecore.EObject grammarElement,
java.lang.String value,
boolean isHidden) |
protected java.util.Set<AbstractFormattingConfig.ElementLocator> |
collectLocators(org.eclipse.emf.ecore.EObject ele) |
protected java.util.Set<AbstractFormattingConfig.ElementLocator> |
collectLocatorsForComments(java.util.Collection<AbstractFormattingConfig.ElementLocator> semanticLocators,
org.eclipse.emf.ecore.EObject left,
org.eclipse.emf.ecore.EObject right) |
protected FormattingConfigBasedStream.Line |
createLine() |
protected FormattingConfigBasedStream.Line |
createLine(int leftover) |
protected FormattingConfigBasedStream.Line |
createLine(java.util.List<FormattingConfigBasedStream.LineEntry> entries) |
protected FormattingConfigBasedStream.Line |
createLine(java.util.List<FormattingConfigBasedStream.LineEntry> initialEntries,
int leftover) |
FormattingConfigBasedStream.LineEntry |
createLineEntry(org.eclipse.emf.ecore.EObject grammarElement,
java.lang.String value,
boolean isHidden,
java.util.Set<AbstractFormattingConfig.ElementLocator> beforeLocators,
java.lang.String leadingWS,
int indent,
ParserRule hiddenTokenDefition) |
protected Pair<java.lang.Integer,RuleCall> |
findTopmostHiddenTokenDef() |
void |
flush() |
protected java.lang.String |
getLineSeparator() |
void |
init(ParserRule startRule) |
void |
writeHidden(org.eclipse.emf.ecore.EObject grammarElement,
java.lang.String value) |
void |
writeSemantic(org.eclipse.emf.ecore.EObject grammarElement,
java.lang.String value) |
protected java.util.Set<AbstractFormattingConfig.ElementLocator> activeRangeLocators
protected FormattingConfig cfg
protected FormattingConfigBasedStream.Line currentLine
protected IHiddenTokenHelper hiddenTokenHelper
protected int indentationLevel
protected java.lang.String indentationPrefix
protected org.eclipse.emf.ecore.EObject last
protected IElementMatcherProvider.IElementMatcher<AbstractFormattingConfig.ElementPattern> matcher
protected java.lang.String preservedWS
protected boolean preserveSpaces
public FormattingConfigBasedStream(ITokenStream out, java.lang.String initialIndentation, FormattingConfig cfg, IElementMatcherProvider.IElementMatcher<AbstractFormattingConfig.ElementPattern> matcher, IHiddenTokenHelper hiddenTokenHelper, boolean preserveSpaces)
protected java.lang.String getLineSeparator()
protected void addLineEntry(org.eclipse.emf.ecore.EObject grammarElement,
java.lang.String value,
boolean isHidden)
throws java.io.IOException
java.io.IOExceptionprotected java.util.Set<AbstractFormattingConfig.ElementLocator> collectLocators(org.eclipse.emf.ecore.EObject ele)
protected java.util.Set<AbstractFormattingConfig.ElementLocator> collectLocatorsForComments(java.util.Collection<AbstractFormattingConfig.ElementLocator> semanticLocators, org.eclipse.emf.ecore.EObject left, org.eclipse.emf.ecore.EObject right)
protected FormattingConfigBasedStream.Line createLine()
protected FormattingConfigBasedStream.Line createLine(int leftover)
protected FormattingConfigBasedStream.Line createLine(java.util.List<FormattingConfigBasedStream.LineEntry> entries)
protected FormattingConfigBasedStream.Line createLine(java.util.List<FormattingConfigBasedStream.LineEntry> initialEntries, int leftover)
public FormattingConfigBasedStream.LineEntry createLineEntry(org.eclipse.emf.ecore.EObject grammarElement, java.lang.String value, boolean isHidden, java.util.Set<AbstractFormattingConfig.ElementLocator> beforeLocators, java.lang.String leadingWS, int indent, ParserRule hiddenTokenDefition)
public void flush()
throws java.io.IOException
flush in interface ITokenStreamflush in class BaseTokenStreamjava.io.IOExceptionpublic void init(ParserRule startRule)
init in interface ITokenStreamExtensioninit in class BaseTokenStreampublic void writeHidden(org.eclipse.emf.ecore.EObject grammarElement,
java.lang.String value)
throws java.io.IOException
writeHidden in interface ITokenStreamwriteHidden in class AbstractTokenStreamjava.io.IOExceptionpublic void writeSemantic(org.eclipse.emf.ecore.EObject grammarElement,
java.lang.String value)
throws java.io.IOException
writeSemantic in interface ITokenStreamwriteSemantic in class AbstractTokenStreamjava.io.IOException