public class Enum1Elements extends AbstractEnumRuleElementFinder { private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName(getGrammar(), "Enum1"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final EnumLiteralDeclaration cLit1EnumLiteralDeclaration_0 = (EnumLiteralDeclaration) cAlternatives.eContents().get(0); private final Keyword cLit1Lit1Keyword_0_0 = (Keyword) cLit1EnumLiteralDeclaration_0.eContents().get(0); private final EnumLiteralDeclaration cLit2EnumLiteralDeclaration_1 = (EnumLiteralDeclaration) cAlternatives.eContents().get(1); private final Keyword cLit2Lit2Keyword_1_0 = (Keyword) cLit2EnumLiteralDeclaration_1.eContents().get(0); private final EnumLiteralDeclaration cLit3EnumLiteralDeclaration_2 = (EnumLiteralDeclaration) cAlternatives.eContents().get(2); private final Keyword cLit3Lit3Keyword_2_0 = (Keyword) cLit3EnumLiteralDeclaration_2.eContents().get(0); // enum Enum1: // lit1 | lit2 | lit3; public EnumRule getRule() { return rule; } // lit1 | lit2 | lit3 public Alternatives getAlternatives() { return cAlternatives; } // lit1 public EnumLiteralDeclaration getLit1EnumLiteralDeclaration_0() { return cLit1EnumLiteralDeclaration_0; } // "lit1" public Keyword getLit1Lit1Keyword_0_0() { return cLit1Lit1Keyword_0_0; } // lit2 public EnumLiteralDeclaration getLit2EnumLiteralDeclaration_1() { return cLit2EnumLiteralDeclaration_1; } // "lit2" public Keyword getLit2Lit2Keyword_1_0() { return cLit2Lit2Keyword_1_0; } // lit3 public EnumLiteralDeclaration getLit3EnumLiteralDeclaration_2() { return cLit3EnumLiteralDeclaration_2; } // "lit3" public Keyword getLit3Lit3Keyword_2_0() { return cLit3Lit3Keyword_2_0; } }
public class GeneratedEnumElements extends AbstractEnumRuleElementFinder { private final EnumRule rule = (EnumRule) GrammarUtil.findRuleForName( getGrammar(), "org.eclipse.xtext.ui.tests.enumrules.EnumRulesUiTestLanguage.GeneratedEnum"); private final Alternatives cAlternatives = (Alternatives) rule.eContents().get(1); private final EnumLiteralDeclaration cSameNameEnumLiteralDeclaration_0 = (EnumLiteralDeclaration) cAlternatives.eContents().get(0); private final Keyword cSameNameSameNameKeyword_0_0 = (Keyword) cSameNameEnumLiteralDeclaration_0.eContents().get(0); private final EnumLiteralDeclaration cDifferentNameEnumLiteralDeclaration_1 = (EnumLiteralDeclaration) cAlternatives.eContents().get(1); private final Keyword cDifferentNameDifferentLiteralKeyword_1_0 = (Keyword) cDifferentNameEnumLiteralDeclaration_1.eContents().get(0); // enum GeneratedEnum: // SameName | DifferentName="DifferentLiteral"; public EnumRule getRule() { return rule; } // SameName | DifferentName="DifferentLiteral" public Alternatives getAlternatives() { return cAlternatives; } // SameName public EnumLiteralDeclaration getSameNameEnumLiteralDeclaration_0() { return cSameNameEnumLiteralDeclaration_0; } // "SameName" public Keyword getSameNameSameNameKeyword_0_0() { return cSameNameSameNameKeyword_0_0; } // DifferentName="DifferentLiteral" public EnumLiteralDeclaration getDifferentNameEnumLiteralDeclaration_1() { return cDifferentNameEnumLiteralDeclaration_1; } // "DifferentLiteral" public Keyword getDifferentNameDifferentLiteralKeyword_1_0() { return cDifferentNameDifferentLiteralKeyword_1_0; } }