/** * generated by Xtext */ package org.example.entities.formatting; import com.google.inject.Inject; import org.eclipse.xtext.Keyword; import org.eclipse.xtext.TerminalRule; import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter; import org.eclipse.xtext.formatting.impl.FormattingConfig; import org.example.entities.services.EntitiesGrammarAccess; /** * This class contains custom formatting description. * * see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#formatting * on how and when to use it * * Also see {@link org.eclipse.xtext.xtext.XtextFormattingTokenSerializer} as an example */ @SuppressWarnings("all") public class EntitiesFormatter extends AbstractDeclarativeFormatter { @Inject private EntitiesGrammarAccess g; @Override protected void configureFormatting(final FormattingConfig c) { final EntitiesGrammarAccess.EntityElements e = this.g.getEntityAccess(); Keyword _leftCurlyBracketKeyword_3 = e.getLeftCurlyBracketKeyword_3(); Keyword _rightCurlyBracketKeyword_5 = e.getRightCurlyBracketKeyword_5(); c.setIndentation(_leftCurlyBracketKeyword_3, _rightCurlyBracketKeyword_5); FormattingConfig.LinewrapLocator _setLinewrap = c.setLinewrap(); Keyword _leftCurlyBracketKeyword_3_1 = e.getLeftCurlyBracketKeyword_3(); _setLinewrap.after(_leftCurlyBracketKeyword_3_1); FormattingConfig.LinewrapLocator _setLinewrap_1 = c.setLinewrap(2); Keyword _rightCurlyBracketKeyword_5_1 = e.getRightCurlyBracketKeyword_5(); _setLinewrap_1.after(_rightCurlyBracketKeyword_5_1); final EntitiesGrammarAccess.AttributeElements a = this.g.getAttributeAccess(); FormattingConfig.LinewrapLocator _setLinewrap_2 = c.setLinewrap(1); Keyword _semicolonKeyword_2 = a.getSemicolonKeyword_2(); _setLinewrap_2.after(_semicolonKeyword_2); FormattingConfig.NoSpaceLocator _setNoSpace = c.setNoSpace(); Keyword _semicolonKeyword_2_1 = a.getSemicolonKeyword_2(); _setNoSpace.before(_semicolonKeyword_2_1); FormattingConfig.LinewrapLocator _setLinewrap_3 = c.setLinewrap(0, 1, 2); TerminalRule _sL_COMMENTRule = this.g.getSL_COMMENTRule(); _setLinewrap_3.before(_sL_COMMENTRule); FormattingConfig.LinewrapLocator _setLinewrap_4 = c.setLinewrap(0, 1, 2); TerminalRule _mL_COMMENTRule = this.g.getML_COMMENTRule(); _setLinewrap_4.before(_mL_COMMENTRule); FormattingConfig.LinewrapLocator _setLinewrap_5 = c.setLinewrap(0, 1, 1); TerminalRule _mL_COMMENTRule_1 = this.g.getML_COMMENTRule(); _setLinewrap_5.after(_mL_COMMENTRule_1); } }