Class RulesFormatter
java.lang.Object
org.eclipse.xtext.formatting.impl.AbstractFormatter
org.eclipse.xtext.formatting.impl.BaseFormatter
org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
org.openhab.core.model.rule.formatting.RulesFormatter
- All Implemented Interfaces:
org.eclipse.xtext.formatting.IFormatter,org.eclipse.xtext.formatting.IFormatterExtension
@NonNullByDefault
public class RulesFormatter
extends org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
This class contains custom formatting description.
see : http://www.eclipse.org/Xtext/documentation.html#formatting
on how and when to use it
Also see
XtextFormatter as an example- Author:
- Ravi Nadahar - Initial contribution
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter.ConfigStore -
Field Summary
Fields inherited from class org.eclipse.xtext.formatting.impl.BaseFormatter
grammar -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafter(org.eclipse.xtext.formatting.impl.AbstractFormattingConfig.ElementLocator locator, String... listKW) voidaround(org.eclipse.xtext.formatting.impl.AbstractFormattingConfig.ElementLocator locator, String... listKW) voidbefore(org.eclipse.xtext.formatting.impl.AbstractFormattingConfig.ElementLocator locator, String... listKW) protected voidconfigureFormatting(org.eclipse.xtext.formatting.impl.FormattingConfig c) org.eclipse.xtext.parsetree.reconstr.ITokenStreamcreateFormatterStream(@Nullable String indent, @Nullable org.eclipse.xtext.parsetree.reconstr.ITokenStream out, boolean preserveWhitespaces) org.eclipse.xtext.parsetree.reconstr.ITokenStreamcreateFormatterStream(@Nullable org.eclipse.emf.ecore.EObject context, @Nullable String indent, @Nullable org.eclipse.xtext.parsetree.reconstr.ITokenStream out, boolean preserveWhitespaces) voidwithinKeywordPairs(org.eclipse.xtext.formatting.impl.FormattingConfig.NoSpaceLocator locator, String leftKW, String rightKW) Methods inherited from class org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
createFormattingConfig, createMatcher, getConfig, getGrammarAccess, getHiddenTokenHelper, getIndentInfo, getLineSeparatorInfo, getMatcherProvider, saveDebugGraphvizDiagram, setGrammarAccessMethods inherited from class org.eclipse.xtext.formatting.impl.BaseFormatter
getWSRule
-
Constructor Details
-
RulesFormatter
public RulesFormatter()
-
-
Method Details
-
configureFormatting
protected void configureFormatting(@NonNullByDefault({}) org.eclipse.xtext.formatting.impl.FormattingConfig c) - Specified by:
configureFormattingin classorg.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
-
withinKeywordPairs
-
around
public void around(org.eclipse.xtext.formatting.impl.AbstractFormattingConfig.ElementLocator locator, String... listKW) -
after
public void after(org.eclipse.xtext.formatting.impl.AbstractFormattingConfig.ElementLocator locator, String... listKW) -
before
public void before(org.eclipse.xtext.formatting.impl.AbstractFormattingConfig.ElementLocator locator, String... listKW) -
createFormatterStream
public org.eclipse.xtext.parsetree.reconstr.ITokenStream createFormatterStream(@Nullable String indent, @Nullable org.eclipse.xtext.parsetree.reconstr.ITokenStream out, boolean preserveWhitespaces) - Specified by:
createFormatterStreamin interfaceorg.eclipse.xtext.formatting.IFormatter- Overrides:
createFormatterStreamin classorg.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
-
createFormatterStream
public org.eclipse.xtext.parsetree.reconstr.ITokenStream createFormatterStream(@Nullable org.eclipse.emf.ecore.EObject context, @Nullable String indent, @Nullable org.eclipse.xtext.parsetree.reconstr.ITokenStream out, boolean preserveWhitespaces) - Specified by:
createFormatterStreamin interfaceorg.eclipse.xtext.formatting.IFormatterExtension- Overrides:
createFormatterStreamin classorg.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
-