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

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

Added first quickfixes

File size: 2.3 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.RuleCall;
11import org.eclipse.xtext.TerminalRule;
12import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter;
13import org.eclipse.xtext.formatting.impl.FormattingConfig;
14import org.eclipse.xtext.xbase.lib.Extension;
15
16/**
17 * This class contains custom formatting description.
18 *
19 * see : http://www.eclipse.org/Xtext/documentation.html#formatting
20 * on how and when to use it
21 *
22 * Also see {@link org.eclipse.xtext.xtext.XtextFormattingTokenSerializer} as an example
23 */
24@SuppressWarnings("all")
25public class EbnfFormatter extends AbstractDeclarativeFormatter {
26  @Inject
27  @Extension
28  private EbnfGrammarAccess _ebnfGrammarAccess;
29 
30  protected void configureFormatting(final FormattingConfig c) {
31    FormattingConfig.LinewrapLocator _setLinewrap = c.setLinewrap(0, 1, 2);
32    TerminalRule _sL_COMMENTRule = this._ebnfGrammarAccess.getSL_COMMENTRule();
33    _setLinewrap.before(_sL_COMMENTRule);
34    FormattingConfig.LinewrapLocator _setLinewrap_1 = c.setLinewrap(0, 1, 2);
35    TerminalRule _mL_COMMENTRule = this._ebnfGrammarAccess.getML_COMMENTRule();
36    _setLinewrap_1.before(_mL_COMMENTRule);
37    FormattingConfig.LinewrapLocator _setLinewrap_2 = c.setLinewrap(0, 1, 1);
38    TerminalRule _mL_COMMENTRule_1 = this._ebnfGrammarAccess.getML_COMMENTRule();
39    _setLinewrap_2.after(_mL_COMMENTRule_1);
40    IGrammarAccess _grammarAccess = this.getGrammarAccess();
41    EbnfGrammarAccess f = ((EbnfGrammarAccess) _grammarAccess);
42    FormattingConfig.LinewrapLocator _setLinewrap_3 = c.setLinewrap();
43    ParserRule _ruleRule = f.getRuleRule();
44    _setLinewrap_3.before(_ruleRule);
45    FormattingConfig.LinewrapLocator _setLinewrap_4 = c.setLinewrap();
46    ParserRule _importRule = f.getImportRule();
47    _setLinewrap_4.before(_importRule);
48    FormattingConfig.NoSpaceLocator _setNoSpace = c.setNoSpace();
49    EbnfGrammarAccess.RuleElements _ruleAccess = f.getRuleAccess();
50    RuleCall _rulenumberINTTerminalRuleCall_0_0_0 = _ruleAccess.getRulenumberINTTerminalRuleCall_0_0_0();
51    _setNoSpace.after(_rulenumberINTTerminalRuleCall_0_0_0);
52  }
53}
Note: See TracBrowser for help on using the repository browser.