org.eclipse.xtext.formatting.impl
Class FormattingConfig

java.lang.Object
  extended by org.eclipse.xtext.formatting.impl.AbstractFormattingConfig
      extended by org.eclipse.xtext.formatting.impl.FormattingConfig

public class FormattingConfig
extends AbstractFormattingConfig

Author:
Moritz Eysholdt - Initial contribution and API

Nested Class Summary
 class FormattingConfig.IndentationLocatorEnd
           
 class FormattingConfig.IndentationLocatorStart
           
 class FormattingConfig.LinewrapLocator
           
 class FormattingConfig.NoLinewrapLocator
           
 class FormattingConfig.NoSpaceLocator
           
 class FormattingConfig.SpaceLocator
           
 
Nested classes/interfaces inherited from class org.eclipse.xtext.formatting.impl.AbstractFormattingConfig
AbstractFormattingConfig.ElementBeforeAfterPattern, AbstractFormattingConfig.ElementBetweenPattern, AbstractFormattingConfig.ElementLocator, AbstractFormattingConfig.ElementPattern, AbstractFormattingConfig.LocatorType
 
Field Summary
protected  int charsPerLine
           
protected  IIndentationInformation indentInfo
           
protected  TerminalRule whitespaceRule
          Deprecated. 
protected  int wrappedLineIndentation
           
 
Fields inherited from class org.eclipse.xtext.formatting.impl.AbstractFormattingConfig
grammarAccess, hiddenTokenHelper, locatorsCommentAfter, locatorsCommentBefore, locatorsSemantic
 
Constructor Summary
FormattingConfig(IGrammarAccess grammarAccess, IHiddenTokenHelper hiddenTokenHelper, IIndentationInformation indentInfo)
           
 
Method Summary
 int getCharsPerLine()
           
 java.lang.String getIndentationSpace()
           
 TerminalRule getWhitespaceRule()
          Deprecated. 
 int getWrappedLineIndentation()
           
 void setAutoLinewrap(int charsPerLine)
           
 void setIndentation(AbstractElement beginElement, AbstractElement endElement)
           
 FormattingConfig.IndentationLocatorEnd setIndentationDecrement()
           
 FormattingConfig.IndentationLocatorStart setIndentationIncrement()
           
 FormattingConfig.LinewrapLocator setLinewrap()
           
 FormattingConfig.LinewrapLocator setLinewrap(int lines)
           
 FormattingConfig.LinewrapLocator setLinewrap(int minWraps, int defaultWraps, int maxWraps)
           
 FormattingConfig.NoLinewrapLocator setNoLinewrap()
           
 FormattingConfig.NoSpaceLocator setNoSpace()
           
 FormattingConfig.SpaceLocator setSpace(java.lang.String space)
           
 void setWhitespaceRule(TerminalRule rule)
          Deprecated. 
 void setWrappedLineIndentation(int wrapIndent)
           
 
Methods inherited from class org.eclipse.xtext.formatting.impl.AbstractFormattingConfig
addLocator, addLocatorComment, addLocatorSemantic, addLocatorSemantic, getAbstractElements, getLocatorsForCommentTokensAfter, getLocatorsForCommentTokensBefore, getLocatorsForSemanticTokens
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

charsPerLine

protected int charsPerLine

indentInfo

protected IIndentationInformation indentInfo

wrappedLineIndentation

protected int wrappedLineIndentation
Since:
2.0

whitespaceRule

@Deprecated
protected TerminalRule whitespaceRule
Deprecated. 
Constructor Detail

FormattingConfig

public FormattingConfig(IGrammarAccess grammarAccess,
                        IHiddenTokenHelper hiddenTokenHelper,
                        IIndentationInformation indentInfo)
Method Detail

getWrappedLineIndentation

public int getWrappedLineIndentation()
Since:
2.0

setWrappedLineIndentation

public void setWrappedLineIndentation(int wrapIndent)
Since:
2.0

getWhitespaceRule

@Deprecated
public TerminalRule getWhitespaceRule()
Deprecated. 


setWhitespaceRule

@Deprecated
public void setWhitespaceRule(TerminalRule rule)
Deprecated. 


getCharsPerLine

public int getCharsPerLine()

getIndentationSpace

public java.lang.String getIndentationSpace()

setAutoLinewrap

public void setAutoLinewrap(int charsPerLine)

setIndentation

public void setIndentation(AbstractElement beginElement,
                           AbstractElement endElement)

setIndentationIncrement

public FormattingConfig.IndentationLocatorStart setIndentationIncrement()

setIndentationDecrement

public FormattingConfig.IndentationLocatorEnd setIndentationDecrement()

setLinewrap

public FormattingConfig.LinewrapLocator setLinewrap()

setLinewrap

public FormattingConfig.LinewrapLocator setLinewrap(int lines)

setLinewrap

public FormattingConfig.LinewrapLocator setLinewrap(int minWraps,
                                                    int defaultWraps,
                                                    int maxWraps)

setNoLinewrap

public FormattingConfig.NoLinewrapLocator setNoLinewrap()

setNoSpace

public FormattingConfig.NoSpaceLocator setNoSpace()

setSpace

public FormattingConfig.SpaceLocator setSpace(java.lang.String space)