Class FormattingConfigBasedStream.Line
- java.lang.Object
-
- org.eclipse.xtext.formatting.impl.FormattingConfigBasedStream.Line
-
- Enclosing class:
- FormattingConfigBasedStream
protected class FormattingConfigBasedStream.Line extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<FormattingConfigBasedStream.LineEntry>entriesprotected java.lang.Stringindentprotected intlastBreakableEntryIndexprotected intleftoverprotected booleanstartWithNLprotected inttotalLength
-
Constructor Summary
Constructors Modifier Constructor Description Line()protectedLine(int leftover)protectedLine(java.util.List<FormattingConfigBasedStream.LineEntry> entries)protectedLine(java.util.List<FormattingConfigBasedStream.LineEntry> initialEntries, int leftover)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormattingConfigBasedStream.Lineadd(FormattingConfigBasedStream.LineEntry lineEntry)protected voidaddSpacesToTotalLength(FormattingConfigBasedStream.LineEntry lineEntry, boolean first)voidflush()protected voidflush(ITokenStream intoStream, int endIndex)protected FormattingConfigBasedStream.LineflushLine()protected java.lang.StringgetIndentation(int indentation)org.eclipse.xtext.util.Pair<AbstractRule,java.lang.String>getSpaces(FormattingConfigBasedStream.LineEntry entry, boolean isLineStart)java.lang.StringgetSpacesStr(FormattingConfigBasedStream.LineEntry entry, boolean isLineStart)java.lang.StringtoString()protected java.lang.Stringwrap(int lines, java.lang.String indent)
-
-
-
Field Detail
-
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
-
-
Constructor Detail
-
Line
public Line()
-
Line
protected Line(int leftover)
-
Line
protected Line(java.util.List<FormattingConfigBasedStream.LineEntry> entries)
-
Line
protected Line(java.util.List<FormattingConfigBasedStream.LineEntry> initialEntries, int leftover)
-
-
Method Detail
-
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 org.eclipse.xtext.util.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:
toStringin classjava.lang.Object
-
wrap
protected java.lang.String wrap(int lines, java.lang.String indent)
-
-