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 Set<AbstractFormattingConfig.ElementLocator> |
activeRangeLocators |
protected FormattingConfig |
cfg |
protected FormattingConfigBasedStream.Line |
currentLine |
protected IHiddenTokenHelper |
hiddenTokenHelper |
protected int |
indentationLevel |
protected String |
indentationPrefix |
protected org.eclipse.emf.ecore.EObject |
last |
protected IElementMatcherProvider.IElementMatcher<AbstractFormattingConfig.ElementPattern> |
matcher |
protected String |
preservedWS |
protected boolean |
preserveSpaces |
out| Constructor and Description |
|---|
FormattingConfigBasedStream(ITokenStream out,
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,
String value,
boolean isHidden) |
protected Set<AbstractFormattingConfig.ElementLocator> |
collectLocators(org.eclipse.emf.ecore.EObject ele) |
protected Set<AbstractFormattingConfig.ElementLocator> |
collectLocatorsForComments(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(List<FormattingConfigBasedStream.LineEntry> entries) |
protected FormattingConfigBasedStream.Line |
createLine(List<FormattingConfigBasedStream.LineEntry> initialEntries,
int leftover) |
FormattingConfigBasedStream.LineEntry |
createLineEntry(org.eclipse.emf.ecore.EObject grammarElement,
String value,
boolean isHidden,
Set<AbstractFormattingConfig.ElementLocator> beforeLocators,
String leadingWS,
int indent,
ParserRule hiddenTokenDefition) |
protected Pair<Integer,RuleCall> |
findTopmostHiddenTokenDef() |
void |
flush() |
protected String |
getLineSeparator() |
void |
init(ParserRule startRule) |
void |
writeHidden(org.eclipse.emf.ecore.EObject grammarElement,
String value) |
void |
writeSemantic(org.eclipse.emf.ecore.EObject grammarElement,
String value) |
protected Set<AbstractFormattingConfig.ElementLocator> activeRangeLocators
protected FormattingConfig cfg
protected FormattingConfigBasedStream.Line currentLine
protected IHiddenTokenHelper hiddenTokenHelper
protected int indentationLevel
protected String indentationPrefix
protected org.eclipse.emf.ecore.EObject last
protected IElementMatcherProvider.IElementMatcher<AbstractFormattingConfig.ElementPattern> matcher
protected String preservedWS
protected boolean preserveSpaces
public FormattingConfigBasedStream(ITokenStream out, String initialIndentation, FormattingConfig cfg, IElementMatcherProvider.IElementMatcher<AbstractFormattingConfig.ElementPattern> matcher, IHiddenTokenHelper hiddenTokenHelper, boolean preserveSpaces)
protected String getLineSeparator()
protected void addLineEntry(org.eclipse.emf.ecore.EObject grammarElement,
String value,
boolean isHidden)
throws IOException
IOExceptionprotected Set<AbstractFormattingConfig.ElementLocator> collectLocators(org.eclipse.emf.ecore.EObject ele)
protected Set<AbstractFormattingConfig.ElementLocator> collectLocatorsForComments(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(List<FormattingConfigBasedStream.LineEntry> entries)
protected FormattingConfigBasedStream.Line createLine(List<FormattingConfigBasedStream.LineEntry> initialEntries, int leftover)
public FormattingConfigBasedStream.LineEntry createLineEntry(org.eclipse.emf.ecore.EObject grammarElement, String value, boolean isHidden, Set<AbstractFormattingConfig.ElementLocator> beforeLocators, String leadingWS, int indent, ParserRule hiddenTokenDefition)
public void flush()
throws IOException
flush in interface ITokenStreamflush in class BaseTokenStreamIOExceptionpublic void init(ParserRule startRule)
init in interface ITokenStreamExtensioninit in class BaseTokenStreampublic void writeHidden(org.eclipse.emf.ecore.EObject grammarElement,
String value)
throws IOException
writeHidden in interface ITokenStreamwriteHidden in class AbstractTokenStreamIOExceptionpublic void writeSemantic(org.eclipse.emf.ecore.EObject grammarElement,
String value)
throws IOException
writeSemantic in interface ITokenStreamwriteSemantic in class AbstractTokenStreamIOExceptionCopyright © 2015. All Rights Reserved.