Class RichStringFormatter
- java.lang.Object
-
- org.eclipse.xtend.core.formatting2.RichStringFormatter
-
@FinalFieldsConstructor public class RichStringFormatter extends java.lang.Object
cases to distinguish: 1. single-line 2. multi-line with text after opening ''': lines start with semantic whitespace 3. multi-line with text before closing ''': no indentation 4. multi-line with only whitespace after opening ''' and before closing ''': one level of extra indentation between ''' and '''
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RichStringFormatter.Factory
-
Constructor Summary
Constructors Constructor Description RichStringFormatter(RichStringFormatter.Factory factory, org.eclipse.xtext.formatting2.regionaccess.ITextRegionExtensions _iTextRegionExtensions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_format(java.lang.Void expr, org.eclipse.xtext.formatting2.IFormattableDocument doc)
protected void
_format(RichStringElseIf expr, org.eclipse.xtext.formatting2.IFormattableDocument doc)
protected void
_format(RichStringForLoop expr, org.eclipse.xtext.formatting2.IFormattableDocument doc)
protected void
_format(RichStringIf expr, org.eclipse.xtext.formatting2.IFormattableDocument doc)
protected void
_format(RichStringLiteral expr, org.eclipse.xtext.formatting2.IFormattableDocument doc)
protected void
_format(RichString richString, org.eclipse.xtext.formatting2.IFormattableDocument doc)
protected void
_format(org.eclipse.xtext.xbase.XExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument doc)
protected boolean
_hasSyntaxError(org.eclipse.xtext.formatting2.regionaccess.IEObjectRegion region)
protected boolean
_hasSyntaxError(org.eclipse.xtext.formatting2.regionaccess.internal.NodeEObjectRegion region)
protected void
_suppressLineWraps(org.eclipse.xtext.formatting2.IHiddenRegionFormatting it)
protected void
_suppressLineWraps(org.eclipse.xtext.formatting2.internal.HiddenRegionReplacer it)
protected void
_suppressLineWraps(org.eclipse.xtext.formatting2.ITextReplacer it)
void
format(org.eclipse.emf.ecore.EObject richString, org.eclipse.xtext.formatting2.IFormattableDocument doc)
protected void
formatIntoSingleLine(org.eclipse.xtext.formatting2.IFormattableDocument doc, org.eclipse.emf.ecore.EObject obj)
protected boolean
hasSyntaxError(org.eclipse.xtext.formatting2.regionaccess.IEObjectRegion region)
protected void
setNewLines(org.eclipse.xtext.formatting2.IFormattableDocument doc, int offset, int length, int indentationIncrease, int indentationDecrease, int newLines)
protected void
setSpace(org.eclipse.xtext.formatting2.IFormattableDocument doc, int offset, int length, java.lang.String space)
protected void
suppressLineWraps(java.lang.Object it)
-
-
-
Constructor Detail
-
RichStringFormatter
public RichStringFormatter(RichStringFormatter.Factory factory, org.eclipse.xtext.formatting2.regionaccess.ITextRegionExtensions _iTextRegionExtensions)
-
-
Method Detail
-
_format
protected void _format(RichString richString, org.eclipse.xtext.formatting2.IFormattableDocument doc)
-
_hasSyntaxError
protected boolean _hasSyntaxError(org.eclipse.xtext.formatting2.regionaccess.IEObjectRegion region)
-
_hasSyntaxError
protected boolean _hasSyntaxError(org.eclipse.xtext.formatting2.regionaccess.internal.NodeEObjectRegion region)
-
setNewLines
protected void setNewLines(org.eclipse.xtext.formatting2.IFormattableDocument doc, int offset, int length, int indentationIncrease, int indentationDecrease, int newLines)
-
setSpace
protected void setSpace(org.eclipse.xtext.formatting2.IFormattableDocument doc, int offset, int length, java.lang.String space)
-
_format
protected void _format(RichStringLiteral expr, org.eclipse.xtext.formatting2.IFormattableDocument doc)
-
_format
protected void _format(java.lang.Void expr, org.eclipse.xtext.formatting2.IFormattableDocument doc)
-
formatIntoSingleLine
protected void formatIntoSingleLine(org.eclipse.xtext.formatting2.IFormattableDocument doc, org.eclipse.emf.ecore.EObject obj)
-
_suppressLineWraps
protected void _suppressLineWraps(org.eclipse.xtext.formatting2.ITextReplacer it)
-
_suppressLineWraps
protected void _suppressLineWraps(org.eclipse.xtext.formatting2.internal.HiddenRegionReplacer it)
-
_suppressLineWraps
protected void _suppressLineWraps(org.eclipse.xtext.formatting2.IHiddenRegionFormatting it)
-
_format
protected void _format(org.eclipse.xtext.xbase.XExpression expr, @Extension org.eclipse.xtext.formatting2.IFormattableDocument doc)
-
_format
protected void _format(RichStringIf expr, @Extension org.eclipse.xtext.formatting2.IFormattableDocument doc)
-
_format
protected void _format(RichStringElseIf expr, @Extension org.eclipse.xtext.formatting2.IFormattableDocument doc)
-
_format
protected void _format(RichStringForLoop expr, @Extension org.eclipse.xtext.formatting2.IFormattableDocument doc)
-
format
public void format(org.eclipse.emf.ecore.EObject richString, org.eclipse.xtext.formatting2.IFormattableDocument doc)
-
hasSyntaxError
protected boolean hasSyntaxError(org.eclipse.xtext.formatting2.regionaccess.IEObjectRegion region)
-
suppressLineWraps
protected void suppressLineWraps(java.lang.Object it)
-
-