source: default/v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/xtend-gen/de/ugoe/cs/swe/bnftools/formatting/EbnfFormatter.java @ 61

Last change on this file since 61 was 61, checked in by hkaulbersch, 10 years ago

initial commit

File size: 2.0 KB
Line 
1/**
2 * generated by Xtext
3 */
4package de.ugoe.cs.swe.bnftools.formatting;
5
6import com.google.inject.Inject;
7import de.ugoe.cs.swe.bnftools.services.EbnfGrammarAccess;
8import org.eclipse.xtext.IGrammarAccess;
9import org.eclipse.xtext.ParserRule;
10import org.eclipse.xtext.TerminalRule;
11import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter;
12import org.eclipse.xtext.formatting.impl.FormattingConfig;
13import org.eclipse.xtext.xbase.lib.Extension;
14
15/**
16 * This class contains custom formatting description.
17 *
18 * see : http://www.eclipse.org/Xtext/documentation.html#formatting
19 * on how and when to use it
20 *
21 * Also see {@link org.eclipse.xtext.xtext.XtextFormattingTokenSerializer} as an example
22 */
23@SuppressWarnings("all")
24public class EbnfFormatter extends AbstractDeclarativeFormatter {
25  @Inject
26  @Extension
27  private EbnfGrammarAccess _ebnfGrammarAccess;
28 
29  protected void configureFormatting(final FormattingConfig c) {
30    FormattingConfig.LinewrapLocator _setLinewrap = c.setLinewrap(0, 1, 2);
31    TerminalRule _sL_COMMENTRule = this._ebnfGrammarAccess.getSL_COMMENTRule();
32    _setLinewrap.before(_sL_COMMENTRule);
33    FormattingConfig.LinewrapLocator _setLinewrap_1 = c.setLinewrap(0, 1, 2);
34    TerminalRule _mL_COMMENTRule = this._ebnfGrammarAccess.getML_COMMENTRule();
35    _setLinewrap_1.before(_mL_COMMENTRule);
36    FormattingConfig.LinewrapLocator _setLinewrap_2 = c.setLinewrap(0, 1, 1);
37    TerminalRule _mL_COMMENTRule_1 = this._ebnfGrammarAccess.getML_COMMENTRule();
38    _setLinewrap_2.after(_mL_COMMENTRule_1);
39    IGrammarAccess _grammarAccess = this.getGrammarAccess();
40    EbnfGrammarAccess f = ((EbnfGrammarAccess) _grammarAccess);
41    FormattingConfig.LinewrapLocator _setLinewrap_3 = c.setLinewrap();
42    ParserRule _ruleRule = f.getRuleRule();
43    _setLinewrap_3.before(_ruleRule);
44    FormattingConfig.LinewrapLocator _setLinewrap_4 = c.setLinewrap();
45    ParserRule _importRule = f.getImportRule();
46    _setLinewrap_4.before(_importRule);
47  }
48}
Note: See TracBrowser for help on using the repository browser.