org.eclipse.xtext.formatting.impl
Class FormattingConfigBasedStream.Line
java.lang.Object
org.eclipse.xtext.formatting.impl.FormattingConfigBasedStream.Line
- Enclosing class:
- FormattingConfigBasedStream
protected class FormattingConfigBasedStream.Line
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
entries
protected java.util.List<FormattingConfigBasedStream.LineEntry> entries
indent
protected java.lang.String indent
lastBreakableEntryIndex
protected int lastBreakableEntryIndex
leftover
protected int leftover
startWithNL
protected boolean startWithNL
totalLength
protected int totalLength
FormattingConfigBasedStream.Line
public FormattingConfigBasedStream.Line()
FormattingConfigBasedStream.Line
protected FormattingConfigBasedStream.Line(int leftover)
FormattingConfigBasedStream.Line
protected FormattingConfigBasedStream.Line(java.util.List<FormattingConfigBasedStream.LineEntry> entries)
FormattingConfigBasedStream.Line
protected FormattingConfigBasedStream.Line(java.util.List<FormattingConfigBasedStream.LineEntry> initialEntries,
int leftover)
add
public FormattingConfigBasedStream.Line add(FormattingConfigBasedStream.LineEntry lineEntry)
throws java.io.IOException
- Throws:
java.io.IOException
addSpacesToTotalLength
protected void addSpacesToTotalLength(FormattingConfigBasedStream.LineEntry lineEntry,
boolean first)
flush
public void flush()
throws java.io.IOException
- Throws:
java.io.IOException
flush
protected void flush(ITokenStream intoStream,
int endIndex)
throws java.io.IOException
- Parameters:
endIndex
- the index of the last entry to flush, exclusive.
- Throws:
java.io.IOException
flushLine
protected FormattingConfigBasedStream.Line flushLine()
throws java.io.IOException
- Throws:
java.io.IOException
getIndentation
protected java.lang.String getIndentation(int indentation)
getSpaces
public Pair<AbstractRule,java.lang.String> getSpaces(FormattingConfigBasedStream.LineEntry entry,
boolean isLineStart)
getSpacesStr
public java.lang.String getSpacesStr(FormattingConfigBasedStream.LineEntry entry,
boolean isLineStart)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
wrap
protected java.lang.String wrap(int lines,
java.lang.String indent)