org.eclipse.xtext.formatting.impl
Class AbstractDeclarativeFormatter

java.lang.Object
  extended by org.eclipse.xtext.formatting.impl.AbstractFormatter
      extended by org.eclipse.xtext.formatting.impl.BaseFormatter
          extended by org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
All Implemented Interfaces:
IFormatter
Direct Known Subclasses:
CodetemplatesFormatter, PureXbaseFormatter, SimpleAntlrFormatter, SimpleExpressionsFormatter, TemplatesFormatter, XbaseFormatter, XbaseWithAnnotationsFormatter, Xtend2Formatter, XtextFormatter, XtypeFormatter

public abstract class AbstractDeclarativeFormatter
extends BaseFormatter

Author:
Moritz Eysholdt - Initial contribution and API

Nested Class Summary
protected static class AbstractDeclarativeFormatter.ConfigStore
           
 
Field Summary
 
Fields inherited from class org.eclipse.xtext.formatting.impl.BaseFormatter
grammar
 
Constructor Summary
AbstractDeclarativeFormatter()
           
 
Method Summary
protected abstract  void configureFormatting(FormattingConfig config)
           
 ITokenStream createFormatterStream(java.lang.String indent, ITokenStream out, boolean preserveWhitespaces)
           
protected  FormattingConfig createFormattingConfig()
           
protected  IElementMatcherProvider.IElementMatcher<AbstractFormattingConfig.ElementPattern> createMatcher()
           
protected  FormattingConfig getConfig()
           
protected  IGrammarAccess getGrammarAccess()
           
protected  IHiddenTokenHelper getHiddenTokenHelper()
           
protected  IIndentationInformation getIndentInfo()
           
protected  IElementMatcherProvider getMatcherProvider()
           
protected  void saveDebugGraphvizDiagram(java.lang.String filename)
           
 void setGrammarAccess(IGrammarAccess grammarAccess)
          Deprecated. 
 
Methods inherited from class org.eclipse.xtext.formatting.impl.BaseFormatter
getWSRule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDeclarativeFormatter

public AbstractDeclarativeFormatter()
Method Detail

configureFormatting

protected abstract void configureFormatting(FormattingConfig config)

createFormatterStream

public ITokenStream createFormatterStream(java.lang.String indent,
                                          ITokenStream out,
                                          boolean preserveWhitespaces)
Specified by:
createFormatterStream in interface IFormatter
Overrides:
createFormatterStream in class AbstractFormatter

createFormattingConfig

protected FormattingConfig createFormattingConfig()

createMatcher

protected IElementMatcherProvider.IElementMatcher<AbstractFormattingConfig.ElementPattern> createMatcher()

getConfig

protected FormattingConfig getConfig()

getGrammarAccess

protected IGrammarAccess getGrammarAccess()

getHiddenTokenHelper

protected IHiddenTokenHelper getHiddenTokenHelper()

getIndentInfo

protected IIndentationInformation getIndentInfo()

getMatcherProvider

protected IElementMatcherProvider getMatcherProvider()

saveDebugGraphvizDiagram

protected void saveDebugGraphvizDiagram(java.lang.String filename)

setGrammarAccess

@Deprecated
public void setGrammarAccess(IGrammarAccess grammarAccess)
Deprecated.