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>
entries
protected java.lang.String
indent
protected int
lastBreakableEntryIndex
protected int
leftover
protected boolean
startWithNL
protected int
totalLength
-
Constructor Summary
Constructors Modifier Constructor Description Line()
protected
Line(int leftover)
protected
Line(java.util.List<FormattingConfigBasedStream.LineEntry> entries)
protected
Line(java.util.List<FormattingConfigBasedStream.LineEntry> initialEntries, int leftover)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormattingConfigBasedStream.Line
add(FormattingConfigBasedStream.LineEntry lineEntry)
protected void
addSpacesToTotalLength(FormattingConfigBasedStream.LineEntry lineEntry, boolean first)
void
flush()
protected void
flush(ITokenStream intoStream, int endIndex)
protected FormattingConfigBasedStream.Line
flushLine()
protected java.lang.String
getIndentation(int indentation)
org.eclipse.xtext.util.Pair<AbstractRule,java.lang.String>
getSpaces(FormattingConfigBasedStream.LineEntry entry, boolean isLineStart)
java.lang.String
getSpacesStr(FormattingConfigBasedStream.LineEntry entry, boolean isLineStart)
java.lang.String
toString()
protected java.lang.String
wrap(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:
toString
in classjava.lang.Object
-
wrap
protected java.lang.String wrap(int lines, java.lang.String indent)
-
-