Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tests for Xtend Scoping API are green

  • Loading branch information...
commit 1bf10c8a3f4f2b5cac5886e18ab2d2a926f32e5e 1 parent 1b95e63
szarnekow authored
Showing with 64 additions and 20,418 deletions.
  1. +18 −7 plugins/org.eclipse.xtext.xtend/src/org/eclipse/xtext/xtend/crossref/AbstractXtendScopeProvider.java
  2. +20 −14 tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
  3. +3 −3 tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/XtextTest.ecore
  4. +0 −47 ...rg/eclipse/xtext/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/KeywordsTestLanguageFactory.java
  5. +0 −239 ...rg/eclipse/xtext/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/KeywordsTestLanguagePackage.java
  6. +0 −136 ....xtend.tests/src-gen/org/eclipse/xtext/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/Model.java
  7. +0 −110 ...e/xtext/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/impl/KeywordsTestLanguageFactoryImpl.java
  8. +0 −232 ...e/xtext/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/impl/KeywordsTestLanguagePackageImpl.java
  9. +0 −349 ...sts/src-gen/org/eclipse/xtext/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/impl/ModelImpl.java
  10. +0 −136 ...text/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/util/KeywordsTestLanguageAdapterFactory.java
  11. +0 −142 ...clipse/xtext/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/util/KeywordsTestLanguageSwitch.java
  12. +1 −0  ...pse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenContentAssistTestLanguageScopeProvider.ext
  13. +8 −5 ....xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
  14. +3 −3 tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
  15. +0 −55 ...c-gen/org/eclipse/xtext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/AbstractRule.java
  16. +0 −55 ...n/org/eclipse/xtext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/AbstractRuleCall.java
  17. +0 −83 ...ext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/ContentAssistTestLanguageFactory.java
  18. +0 −442 ...ext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/ContentAssistTestLanguagePackage.java
  19. +0 −45 ...eclipse/xtext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/FirstAbstractRuleChild.java
  20. +0 −54 ...clipse/xtext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/SecondAbstractRuleChild.java
  21. +0 −47 ...ests/src-gen/org/eclipse/xtext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/Start.java
  22. +0 −177 ...ipse/xtext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/impl/AbstractRuleCallImpl.java
  23. +0 −181 .../eclipse/xtext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/impl/AbstractRuleImpl.java
  24. +0 −158 ...anguages/contentAssistTestLanguage/contentAssistTestLanguage/impl/ContentAssistTestLanguageFactoryImpl.java
  25. +0 −335 ...anguages/contentAssistTestLanguage/contentAssistTestLanguage/impl/ContentAssistTestLanguagePackageImpl.java
  26. +0 −169 ...text/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/impl/FirstAbstractRuleChildImpl.java
  27. +0 −197 ...ext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/impl/SecondAbstractRuleChildImpl.java
  28. +0 −171 ...gen/org/eclipse/xtext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/impl/StartImpl.java
  29. +0 −216 ...uages/contentAssistTestLanguage/contentAssistTestLanguage/util/ContentAssistTestLanguageAdapterFactory.java
  30. +0 −236 ...testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/util/ContentAssistTestLanguageSwitch.java
  31. +0 −22 ...ests/src-gen/org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/Erwachsener.java
  32. +0 −128 ...nd.tests/src-gen/org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/Familie.java
  33. +0 −23 ...tend.tests/src-gen/org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/Farbe.java
  34. +0 −22 ...xtend.tests/src-gen/org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/Kind.java
  35. +0 −82 ...end.tests/src-gen/org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/Person.java
  36. +0 −101 .../org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/ReferenceGrammarFactory.java
  37. +0 −790 .../org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/ReferenceGrammarPackage.java
  38. +0 −152 ...tests/src-gen/org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/Spielplatz.java
  39. +0 −82 ....tests/src-gen/org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/Spielzeug.java
  40. +0 −46 ...gen/org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/impl/ErwachsenerImpl.java
  41. +0 −357 ...src-gen/org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/impl/FamilieImpl.java
  42. +0 −48 ...s/src-gen/org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/impl/FarbeImpl.java
  43. +0 −46 ...ts/src-gen/org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/impl/KindImpl.java
  44. +0 −237 .../src-gen/org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/impl/PersonImpl.java
  45. +0 −182 ...pse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/impl/ReferenceGrammarFactoryImpl.java
  46. +0 −487 ...pse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/impl/ReferenceGrammarPackageImpl.java
  47. +0 −417 ...-gen/org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/impl/SpielplatzImpl.java
  48. +0 −269 ...c-gen/org/eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/impl/SpielzeugImpl.java
  49. +0 −256 .../xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/util/ReferenceGrammarAdapterFactory.java
  50. +0 −282 .../eclipse/xtext/testlanguages/referenceGrammarTestLanguage/ReferenceGrammar/util/ReferenceGrammarSwitch.java
  51. +0 −47 ...ipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/treeTestLanguage/TreeTestLanguage/Model.java
  52. +0 −101 ...lipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/treeTestLanguage/TreeTestLanguage/Node.java
  53. +0 −56 ...ests/src-gen/org/eclipse/xtext/testlanguages/treeTestLanguage/TreeTestLanguage/TreeTestLanguageFactory.java
  54. +0 −279 ...ests/src-gen/org/eclipse/xtext/testlanguages/treeTestLanguage/TreeTestLanguage/TreeTestLanguagePackage.java
  55. +0 −171 ...t.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/treeTestLanguage/TreeTestLanguage/impl/ModelImpl.java
  56. +0 −299 ...xt.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/treeTestLanguage/TreeTestLanguage/impl/NodeImpl.java
  57. +0 −122 ...gen/org/eclipse/xtext/testlanguages/treeTestLanguage/TreeTestLanguage/impl/TreeTestLanguageFactoryImpl.java
  58. +0 −255 ...gen/org/eclipse/xtext/testlanguages/treeTestLanguage/TreeTestLanguage/impl/TreeTestLanguagePackageImpl.java
  59. +0 −156 .../org/eclipse/xtext/testlanguages/treeTestLanguage/TreeTestLanguage/util/TreeTestLanguageAdapterFactory.java
  60. +0 −165 .../src-gen/org/eclipse/xtext/testlanguages/treeTestLanguage/TreeTestLanguage/util/TreeTestLanguageSwitch.java
  61. +0 −55 ...eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/AbstractElement.java
  62. +0 −83 ....xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/AbstractMetamodelDeclaration.java
  63. +0 −54 ...se.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/AbstractNegatedToken.java
  64. +0 −82 ...rg.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/AbstractRule.java
  65. +0 −108 tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/Action.java
  66. +0 −45 ...rg.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/Alternatives.java
  67. +0 −108 .../org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/Assignment.java
  68. +0 −81 ....eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/CharacterRange.java
  69. +0 −81 ....eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/CrossReference.java
  70. +0 −54 ...ipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/GeneratedMetamodel.java
  71. +0 −125 tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/Grammar.java
  72. +0 −45 tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/Group.java
  73. +0 −54 tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/Keyword.java
  74. +0 −54 ...s/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/LexerRule.java
  75. +0 −22 ...rg.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/NegatedToken.java
  76. +0 −126 .../org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/ParserRule.java
  77. +0 −22 ...pse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/ReferencedMetamodel.java
  78. +0 −54 tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/RuleCall.java
  79. +0 −83 tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/TypeRef.java
  80. +0 −22 ...s/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/UpToToken.java
  81. +0 −54 tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/Wildcard.java
  82. +0 −227 ...clipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/XtextTestFactory.java
  83. +0 −2,058 ...clipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/XtextTestPackage.java
  84. +0 −181 ...text.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/AbstractElementImpl.java
  85. +0 −248 ...sts/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/AbstractMetamodelDeclarationImpl.java
  86. +0 −197 ...xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/AbstractNegatedTokenImpl.java
  87. +0 −269 ...e.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/AbstractRuleImpl.java
  88. +0 −324 ...eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/ActionImpl.java
  89. +0 −169 ...e.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/AlternativesImpl.java
  90. +0 −324 ...pse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/AssignmentImpl.java
  91. +0 −268 ...xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/CharacterRangeImpl.java
  92. +0 −263 ...xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/CrossReferenceImpl.java
  93. +0 −180 ...t.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/GeneratedMetamodelImpl.java
  94. +0 −360 ...clipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/GrammarImpl.java
  95. +0 −169 ....eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/GroupImpl.java
  96. +0 −180 ...clipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/KeywordImpl.java
  97. +0 −180 ...ipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/LexerRuleImpl.java
  98. +0 −46 ...e.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/NegatedTokenImpl.java
  99. +0 −368 ...pse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/ParserRuleImpl.java
  100. +0 −46 ....xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/ReferencedMetamodelImpl.java
  101. +0 −176 ...lipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/RuleCallImpl.java
  102. +0 −243 ...clipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/TypeRefImpl.java
  103. +0 −46 ...ipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/UpToTokenImpl.java
  104. +0 −180 ...lipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/WildcardImpl.java
  105. +0 −350 ...ext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/XtextTestFactoryImpl.java
  106. +0 −1,049 ...ext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/impl/XtextTestPackageImpl.java
  107. +0 −536 ....xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/util/XtextTestAdapterFactory.java
  108. +0 −620 ...se.xtext.xtend.tests/src-gen/org/eclipse/xtext/xtextGrammarTestLanguage/XtextTest/util/XtextTestSwitch.java
  109. +0 −2  tests/org.eclipse.xtext.xtend.tests/src/org/eclipse/xtext/XtextGrammarTestLanguageUIModule.java
  110. +0 −2  tests/org.eclipse.xtext.xtend.tests/src/org/eclipse/xtext/parser/keywords/KeywordsTestLanguageUIModule.java
  111. +0 −2  tests/org.eclipse.xtext.xtend.tests/src/org/eclipse/xtext/testlanguages/ContentAssistTestLanguageUIModule.java
  112. +0 −2  ...org.eclipse.xtext.xtend.tests/src/org/eclipse/xtext/testlanguages/ReferenceGrammarTestLanguageUIModule.java
  113. +0 −2  tests/org.eclipse.xtext.xtend.tests/src/org/eclipse/xtext/testlanguages/TreeTestLanguageUIModule.java
  114. +10 −14 tests/org.eclipse.xtext.xtend.tests/src/org/eclipse/xtext/xtend/crossref/CrossrefTest.java
  115. +1 −1  ...g.eclipse.xtext.xtend.tests/src/org/eclipse/xtext/xtend/tests/GenerateAllTestGrammarsWithXtendServices.java
View
25 plugins/org.eclipse.xtext.xtend/src/org/eclipse/xtext/xtend/crossref/AbstractXtendScopeProvider.java
@@ -8,9 +8,12 @@
package org.eclipse.xtext.xtend.crossref;
import static org.eclipse.xtext.util.CollectionUtils.filter;
+import static org.eclipse.xtext.util.CollectionUtils.nextOrNull;
+import static org.eclipse.xtext.util.CollectionUtils.list;
+import java.util.Collection;
import java.util.Collections;
-import java.util.Iterator;
+import java.util.HashSet;
import java.util.List;
import org.apache.log4j.Logger;
@@ -31,12 +34,20 @@
private static final String SCOPE_EXTENSION_PREFIX = "scope_";
- public IScope getScope(EObject context, EReference reference) {
+ public IScope getScope(EObject context, final EReference reference) {
try {
List<IScopedElement> scopedElements = invokeExtension(extensionName(context, reference), Collections
.singletonList(context));
- // TODO: filter elements
- return new XtendScope(scopedElements);
+ final Collection<String> names = new HashSet<String>(scopedElements.size());
+ return new XtendScope(list(filter(scopedElements, new Filter<IScopedElement>() {
+ public boolean matches(IScopedElement param) {
+ boolean result = reference.getEReferenceType().isSuperTypeOf(param.element().eClass());
+ if (result) {
+ result = names.add(param.name());
+ }
+ return result;
+ }
+ })));
}
catch (Throwable e) {
log.error("Error invoking scope extension", e);
@@ -69,12 +80,12 @@ public IScope getOuterScope() {
}
public IScopedElement getScopedElement(final EObject element) {
- Iterator<IScopedElement> matchesIterator = filter(scopedElements, new Filter<IScopedElement>() {
+ Iterable<IScopedElement> allMatches = filter(scopedElements, new Filter<IScopedElement>() {
public boolean matches(IScopedElement param) {
return param.element().equals(element);
}
- }).iterator();
- return (matchesIterator.hasNext()) ? matchesIterator.next() : null;
+ });
+ return nextOrNull(allMatches);
}
}
View
34 tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
@@ -17,33 +17,39 @@ extension org::eclipse::xtend::util::stdlib::io;
*/
+List[IScopedElement] scope_hiddenTokens(ParserRule this):
+ allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
+ allElements().collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_rule(CrossReference this):
+ allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_rule(emf::EObject this) :
+ allElements().collect(x | createScopedElement(x.referenceName(), x));
+
List[IScopedElement] scope_ePackage(AbstractMetamodelDeclaration this):
allElements().typeSelect(ecore::EPackage).collect(x | createScopedElement(x.referenceName(), x));
+
List[IScopedElement] scope_ePackage(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_rule(RuleCall this):
- allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_rule(emf::EObject this) :
+List[IScopedElement] scope_metamodel(TypeRef this):
+ allElements().typeSelect(AbstractMetamodelDeclaration).collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_metamodel(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_type(TypeRef this):
allElements().typeSelect(ecore::EClassifier).collect(x | createScopedElement(x.referenceName(), x));
+
List[IScopedElement] scope_type(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_rule(CrossReference this):
+List[IScopedElement] scope_rule(RuleCall this):
allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
+
List[IScopedElement] scope_rule(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_hiddenTokens(ParserRule this):
- allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
- allElements().collect(x | createScopedElement(x.referenceName(), x));
-
-List[IScopedElement] scope_metamodel(TypeRef this):
- allElements().typeSelect(AbstractMetamodelDeclaration).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_metamodel(emf::EObject this) :
- allElements().collect(x | createScopedElement(x.referenceName(), x));
-
View
6 tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/XtextTest.ecore
@@ -20,12 +20,12 @@
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AbstractMetamodelDeclaration">
- <eStructuralFeatures xsi:type="ecore:EReference" name="ePackage">
- <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="alias">
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="ePackage">
+ <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EPackage"/>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GeneratedMetamodel" eSuperTypes="//AbstractMetamodelDeclaration">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
View
47 ...eclipse/xtext/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/KeywordsTestLanguageFactory.java
@@ -1,47 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: KeywordsTestLanguageFactory.java,v 1.1 2009/02/06 09:46:52 jkohnlein Exp $
- */
-package org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.KeywordsTestLanguagePackage
- * @generated
- */
-public interface KeywordsTestLanguageFactory extends EFactory
-{
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- KeywordsTestLanguageFactory eINSTANCE = org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl.KeywordsTestLanguageFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Model</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Model</em>'.
- * @generated
- */
- Model createModel();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- KeywordsTestLanguagePackage getKeywordsTestLanguagePackage();
-
-} //KeywordsTestLanguageFactory
View
239 ...eclipse/xtext/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/KeywordsTestLanguagePackage.java
@@ -1,239 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: KeywordsTestLanguagePackage.java,v 1.1 2009/02/06 09:46:52 jkohnlein Exp $
- */
-package org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.KeywordsTestLanguageFactory
- * @model kind="package"
- * @generated
- */
-public interface KeywordsTestLanguagePackage extends EPackage
-{
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "KeywordsTestLanguage";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.eclipse.org/2009/tmf/xtext/KeywordsTestLanguage";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "KeywordsTestLanguage";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- KeywordsTestLanguagePackage eINSTANCE = org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl.KeywordsTestLanguagePackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl.ModelImpl <em>Model</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl.ModelImpl
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl.KeywordsTestLanguagePackageImpl#getModel()
- * @generated
- */
- int MODEL = 0;
-
- /**
- * The feature id for the '<em><b>First</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL__FIRST = 0;
-
- /**
- * The feature id for the '<em><b>Second</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL__SECOND = 1;
-
- /**
- * The feature id for the '<em><b>Third</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL__THIRD = 2;
-
- /**
- * The feature id for the '<em><b>Forth</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL__FORTH = 3;
-
- /**
- * The number of structural features of the '<em>Model</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_FEATURE_COUNT = 4;
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model <em>Model</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Model</em>'.
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model
- * @generated
- */
- EClass getModel();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isFirst <em>First</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>First</em>'.
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isFirst()
- * @see #getModel()
- * @generated
- */
- EAttribute getModel_First();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isSecond <em>Second</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Second</em>'.
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isSecond()
- * @see #getModel()
- * @generated
- */
- EAttribute getModel_Second();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isThird <em>Third</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Third</em>'.
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isThird()
- * @see #getModel()
- * @generated
- */
- EAttribute getModel_Third();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isForth <em>Forth</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Forth</em>'.
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isForth()
- * @see #getModel()
- * @generated
- */
- EAttribute getModel_Forth();
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- KeywordsTestLanguageFactory getKeywordsTestLanguageFactory();
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- interface Literals
- {
- /**
- * The meta object literal for the '{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl.ModelImpl <em>Model</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl.ModelImpl
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl.KeywordsTestLanguagePackageImpl#getModel()
- * @generated
- */
- EClass MODEL = eINSTANCE.getModel();
-
- /**
- * The meta object literal for the '<em><b>First</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute MODEL__FIRST = eINSTANCE.getModel_First();
-
- /**
- * The meta object literal for the '<em><b>Second</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute MODEL__SECOND = eINSTANCE.getModel_Second();
-
- /**
- * The meta object literal for the '<em><b>Third</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute MODEL__THIRD = eINSTANCE.getModel_Third();
-
- /**
- * The meta object literal for the '<em><b>Forth</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute MODEL__FORTH = eINSTANCE.getModel_Forth();
-
- }
-
-} //KeywordsTestLanguagePackage
View
136 ...end.tests/src-gen/org/eclipse/xtext/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/Model.java
@@ -1,136 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: Model.java,v 1.1 2009/02/06 09:46:52 jkohnlein Exp $
- */
-package org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Model</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isFirst <em>First</em>}</li>
- * <li>{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isSecond <em>Second</em>}</li>
- * <li>{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isThird <em>Third</em>}</li>
- * <li>{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isForth <em>Forth</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.KeywordsTestLanguagePackage#getModel()
- * @model
- * @generated
- */
-public interface Model extends EObject
-{
- /**
- * Returns the value of the '<em><b>First</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>First</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>First</em>' attribute.
- * @see #setFirst(boolean)
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.KeywordsTestLanguagePackage#getModel_First()
- * @model
- * @generated
- */
- boolean isFirst();
-
- /**
- * Sets the value of the '{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isFirst <em>First</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>First</em>' attribute.
- * @see #isFirst()
- * @generated
- */
- void setFirst(boolean value);
-
- /**
- * Returns the value of the '<em><b>Second</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Second</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Second</em>' attribute.
- * @see #setSecond(boolean)
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.KeywordsTestLanguagePackage#getModel_Second()
- * @model
- * @generated
- */
- boolean isSecond();
-
- /**
- * Sets the value of the '{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isSecond <em>Second</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Second</em>' attribute.
- * @see #isSecond()
- * @generated
- */
- void setSecond(boolean value);
-
- /**
- * Returns the value of the '<em><b>Third</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Third</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Third</em>' attribute.
- * @see #setThird(boolean)
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.KeywordsTestLanguagePackage#getModel_Third()
- * @model
- * @generated
- */
- boolean isThird();
-
- /**
- * Sets the value of the '{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isThird <em>Third</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Third</em>' attribute.
- * @see #isThird()
- * @generated
- */
- void setThird(boolean value);
-
- /**
- * Returns the value of the '<em><b>Forth</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Forth</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Forth</em>' attribute.
- * @see #setForth(boolean)
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.KeywordsTestLanguagePackage#getModel_Forth()
- * @model
- * @generated
- */
- boolean isForth();
-
- /**
- * Sets the value of the '{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model#isForth <em>Forth</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Forth</em>' attribute.
- * @see #isForth()
- * @generated
- */
- void setForth(boolean value);
-
-} // Model
View
110 ...text/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/impl/KeywordsTestLanguageFactoryImpl.java
@@ -1,110 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: KeywordsTestLanguageFactoryImpl.java,v 1.1 2009/02/06 09:46:54 jkohnlein Exp $
- */
-package org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-
-import org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.*;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class KeywordsTestLanguageFactoryImpl extends EFactoryImpl implements KeywordsTestLanguageFactory
-{
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static KeywordsTestLanguageFactory init()
- {
- try
- {
- KeywordsTestLanguageFactory theKeywordsTestLanguageFactory = (KeywordsTestLanguageFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/2009/tmf/xtext/KeywordsTestLanguage");
- if (theKeywordsTestLanguageFactory != null)
- {
- return theKeywordsTestLanguageFactory;
- }
- }
- catch (Exception exception)
- {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new KeywordsTestLanguageFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public KeywordsTestLanguageFactoryImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass)
- {
- switch (eClass.getClassifierID())
- {
- case KeywordsTestLanguagePackage.MODEL: return createModel();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Model createModel()
- {
- ModelImpl model = new ModelImpl();
- return model;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public KeywordsTestLanguagePackage getKeywordsTestLanguagePackage()
- {
- return (KeywordsTestLanguagePackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static KeywordsTestLanguagePackage getPackage()
- {
- return KeywordsTestLanguagePackage.eINSTANCE;
- }
-
-} //KeywordsTestLanguageFactoryImpl
View
232 ...text/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/impl/KeywordsTestLanguagePackageImpl.java
@@ -1,232 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: KeywordsTestLanguagePackageImpl.java,v 1.1 2009/02/06 09:46:54 jkohnlein Exp $
- */
-package org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-
-import org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.KeywordsTestLanguageFactory;
-import org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.KeywordsTestLanguagePackage;
-import org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class KeywordsTestLanguagePackageImpl extends EPackageImpl implements KeywordsTestLanguagePackage
-{
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass modelEClass = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.KeywordsTestLanguagePackage#eNS_URI
- * @see #init()
- * @generated
- */
- private KeywordsTestLanguagePackageImpl()
- {
- super(eNS_URI, KeywordsTestLanguageFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this
- * model, and for any others upon which it depends. Simple
- * dependencies are satisfied by calling this method on all
- * dependent packages before doing anything else. This method drives
- * initialization for interdependent packages directly, in parallel
- * with this package, itself.
- * <p>Of this package and its interdependencies, all packages which
- * have not yet been registered by their URI values are first created
- * and registered. The packages are then initialized in two steps:
- * meta-model objects for all of the packages are created before any
- * are initialized, since one package's meta-model objects may refer to
- * those of another.
- * <p>Invocation of this method will not affect any packages that have
- * already been initialized.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static KeywordsTestLanguagePackage init()
- {
- if (isInited) return (KeywordsTestLanguagePackage)EPackage.Registry.INSTANCE.getEPackage(KeywordsTestLanguagePackage.eNS_URI);
-
- // Obtain or create and register package
- KeywordsTestLanguagePackageImpl theKeywordsTestLanguagePackage = (KeywordsTestLanguagePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof KeywordsTestLanguagePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new KeywordsTestLanguagePackageImpl());
-
- isInited = true;
-
- // Create package meta-data objects
- theKeywordsTestLanguagePackage.createPackageContents();
-
- // Initialize created meta-data
- theKeywordsTestLanguagePackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theKeywordsTestLanguagePackage.freeze();
-
- return theKeywordsTestLanguagePackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getModel()
- {
- return modelEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getModel_First()
- {
- return (EAttribute)modelEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getModel_Second()
- {
- return (EAttribute)modelEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getModel_Third()
- {
- return (EAttribute)modelEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getModel_Forth()
- {
- return (EAttribute)modelEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public KeywordsTestLanguageFactory getKeywordsTestLanguageFactory()
- {
- return (KeywordsTestLanguageFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents()
- {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- modelEClass = createEClass(MODEL);
- createEAttribute(modelEClass, MODEL__FIRST);
- createEAttribute(modelEClass, MODEL__SECOND);
- createEAttribute(modelEClass, MODEL__THIRD);
- createEAttribute(modelEClass, MODEL__FORTH);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents()
- {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
-
- // Initialize classes and features; add operations and parameters
- initEClass(modelEClass, Model.class, "Model", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getModel_First(), ecorePackage.getEBoolean(), "first", null, 0, 1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getModel_Second(), ecorePackage.getEBoolean(), "second", null, 0, 1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getModel_Third(), ecorePackage.getEBoolean(), "third", null, 0, 1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getModel_Forth(), ecorePackage.getEBoolean(), "forth", null, 0, 1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Create resource
- createResource(eNS_URI);
- }
-
-} //KeywordsTestLanguagePackageImpl
View
349 .../src-gen/org/eclipse/xtext/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/impl/ModelImpl.java
@@ -1,349 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: ModelImpl.java,v 1.1 2009/02/06 09:46:54 jkohnlein Exp $
- */
-package org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-
-import org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.KeywordsTestLanguagePackage;
-import org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Model</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl.ModelImpl#isFirst <em>First</em>}</li>
- * <li>{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl.ModelImpl#isSecond <em>Second</em>}</li>
- * <li>{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl.ModelImpl#isThird <em>Third</em>}</li>
- * <li>{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.impl.ModelImpl#isForth <em>Forth</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ModelImpl extends EObjectImpl implements Model
-{
- /**
- * The default value of the '{@link #isFirst() <em>First</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isFirst()
- * @generated
- * @ordered
- */
- protected static final boolean FIRST_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isFirst() <em>First</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isFirst()
- * @generated
- * @ordered
- */
- protected boolean first = FIRST_EDEFAULT;
-
- /**
- * The default value of the '{@link #isSecond() <em>Second</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSecond()
- * @generated
- * @ordered
- */
- protected static final boolean SECOND_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isSecond() <em>Second</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSecond()
- * @generated
- * @ordered
- */
- protected boolean second = SECOND_EDEFAULT;
-
- /**
- * The default value of the '{@link #isThird() <em>Third</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isThird()
- * @generated
- * @ordered
- */
- protected static final boolean THIRD_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isThird() <em>Third</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isThird()
- * @generated
- * @ordered
- */
- protected boolean third = THIRD_EDEFAULT;
-
- /**
- * The default value of the '{@link #isForth() <em>Forth</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isForth()
- * @generated
- * @ordered
- */
- protected static final boolean FORTH_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isForth() <em>Forth</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isForth()
- * @generated
- * @ordered
- */
- protected boolean forth = FORTH_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ModelImpl()
- {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass()
- {
- return KeywordsTestLanguagePackage.Literals.MODEL;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isFirst()
- {
- return first;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setFirst(boolean newFirst)
- {
- boolean oldFirst = first;
- first = newFirst;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, KeywordsTestLanguagePackage.MODEL__FIRST, oldFirst, first));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSecond()
- {
- return second;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setSecond(boolean newSecond)
- {
- boolean oldSecond = second;
- second = newSecond;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, KeywordsTestLanguagePackage.MODEL__SECOND, oldSecond, second));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isThird()
- {
- return third;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setThird(boolean newThird)
- {
- boolean oldThird = third;
- third = newThird;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, KeywordsTestLanguagePackage.MODEL__THIRD, oldThird, third));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isForth()
- {
- return forth;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setForth(boolean newForth)
- {
- boolean oldForth = forth;
- forth = newForth;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, KeywordsTestLanguagePackage.MODEL__FORTH, oldForth, forth));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType)
- {
- switch (featureID)
- {
- case KeywordsTestLanguagePackage.MODEL__FIRST:
- return isFirst() ? Boolean.TRUE : Boolean.FALSE;
- case KeywordsTestLanguagePackage.MODEL__SECOND:
- return isSecond() ? Boolean.TRUE : Boolean.FALSE;
- case KeywordsTestLanguagePackage.MODEL__THIRD:
- return isThird() ? Boolean.TRUE : Boolean.FALSE;
- case KeywordsTestLanguagePackage.MODEL__FORTH:
- return isForth() ? Boolean.TRUE : Boolean.FALSE;
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue)
- {
- switch (featureID)
- {
- case KeywordsTestLanguagePackage.MODEL__FIRST:
- setFirst(((Boolean)newValue).booleanValue());
- return;
- case KeywordsTestLanguagePackage.MODEL__SECOND:
- setSecond(((Boolean)newValue).booleanValue());
- return;
- case KeywordsTestLanguagePackage.MODEL__THIRD:
- setThird(((Boolean)newValue).booleanValue());
- return;
- case KeywordsTestLanguagePackage.MODEL__FORTH:
- setForth(((Boolean)newValue).booleanValue());
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID)
- {
- switch (featureID)
- {
- case KeywordsTestLanguagePackage.MODEL__FIRST:
- setFirst(FIRST_EDEFAULT);
- return;
- case KeywordsTestLanguagePackage.MODEL__SECOND:
- setSecond(SECOND_EDEFAULT);
- return;
- case KeywordsTestLanguagePackage.MODEL__THIRD:
- setThird(THIRD_EDEFAULT);
- return;
- case KeywordsTestLanguagePackage.MODEL__FORTH:
- setForth(FORTH_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID)
- {
- switch (featureID)
- {
- case KeywordsTestLanguagePackage.MODEL__FIRST:
- return first != FIRST_EDEFAULT;
- case KeywordsTestLanguagePackage.MODEL__SECOND:
- return second != SECOND_EDEFAULT;
- case KeywordsTestLanguagePackage.MODEL__THIRD:
- return third != THIRD_EDEFAULT;
- case KeywordsTestLanguagePackage.MODEL__FORTH:
- return forth != FORTH_EDEFAULT;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString()
- {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (first: ");
- result.append(first);
- result.append(", second: ");
- result.append(second);
- result.append(", third: ");
- result.append(third);
- result.append(", forth: ");
- result.append(forth);
- result.append(')');
- return result.toString();
- }
-
-} //ModelImpl
View
136 ...t/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/util/KeywordsTestLanguageAdapterFactory.java
@@ -1,136 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: KeywordsTestLanguageAdapterFactory.java,v 1.1 2009/02/06 09:46:54 jkohnlein Exp $
- */
-package org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.util;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.*;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.KeywordsTestLanguagePackage
- * @generated
- */
-public class KeywordsTestLanguageAdapterFactory extends AdapterFactoryImpl
-{
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static KeywordsTestLanguagePackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public KeywordsTestLanguageAdapterFactory()
- {
- if (modelPackage == null)
- {
- modelPackage = KeywordsTestLanguagePackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object object)
- {
- if (object == modelPackage)
- {
- return true;
- }
- if (object instanceof EObject)
- {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch that delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected KeywordsTestLanguageSwitch<Adapter> modelSwitch =
- new KeywordsTestLanguageSwitch<Adapter>()
- {
- @Override
- public Adapter caseModel(Model object)
- {
- return createModelAdapter();
- }
- @Override
- public Adapter defaultCase(EObject object)
- {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- @Override
- public Adapter createAdapter(Notifier target)
- {
- return modelSwitch.doSwitch((EObject)target);
- }
-
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model <em>Model</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.Model
- * @generated
- */
- public Adapter createModelAdapter()
- {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc -->
- * This default implementation returns null.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter()
- {
- return null;
- }
-
-} //KeywordsTestLanguageAdapterFactory
View
142 ...pse/xtext/parser/keywords/keywordsTestLanguage/KeywordsTestLanguage/util/KeywordsTestLanguageSwitch.java
@@ -1,142 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: KeywordsTestLanguageSwitch.java,v 1.1 2009/02/06 09:46:54 jkohnlein Exp $
- */
-package org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.util;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.*;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.parser.keywords.keywordsTestLanguage.KeywordsTestLanguage.KeywordsTestLanguagePackage
- * @generated
- */
-public class KeywordsTestLanguageSwitch<T>
-{
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static KeywordsTestLanguagePackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public KeywordsTestLanguageSwitch()
- {
- if (modelPackage == null)
- {
- modelPackage = KeywordsTestLanguagePackage.eINSTANCE;
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- public T doSwitch(EObject theEObject)
- {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(EClass theEClass, EObject theEObject)
- {
- if (theEClass.eContainer() == modelPackage)
- {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else
- {
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch(eSuperTypes.get(0), theEObject);
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(int classifierID, EObject theEObject)
- {
- switch (classifierID)
- {
- case KeywordsTestLanguagePackage.MODEL:
- {
- Model model = (Model)theEObject;
- T result = caseModel(model);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Model</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Model</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseModel(Model object)
- {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- public T defaultCase(EObject object)
- {
- return null;
- }
-
-} //KeywordsTestLanguageSwitch
View
1  ....xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenContentAssistTestLanguageScopeProvider.ext
@@ -18,6 +18,7 @@ extension org::eclipse::xtend::util::stdlib::io;
List[IScopedElement] scope_rule(AbstractRuleCall this):
allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
+
List[IScopedElement] scope_rule(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
View
13 ...ext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
@@ -16,18 +16,21 @@ extension org::eclipse::xtend::util::stdlib::io;
*/
-List[IScopedElement] scope_mutter(Familie this):
- allElements().typeSelect(Erwachsener).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_mutter(emf::EObject this) :
- allElements().collect(x | createScopedElement(x.referenceName(), x));
-
List[IScopedElement] scope_vater(Familie this):
allElements().typeSelect(Erwachsener).collect(x | createScopedElement(x.referenceName(), x));
+
List[IScopedElement] scope_vater(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_kinder(Familie this):
allElements().typeSelect(Kind).collect(x | createScopedElement(x.referenceName(), x));
+
List[IScopedElement] scope_kinder(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_mutter(Familie this):
+ allElements().typeSelect(Erwachsener).collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_mutter(emf::EObject this) :
+ allElements().collect(x | createScopedElement(x.referenceName(), x));
+
View
6 tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
@@ -13,12 +13,12 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="familie" unique="false" upperBound="-1" eType="//Familie" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Person">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="age">
- <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="age">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Kind" eSuperTypes="//Person"/>
<eClassifiers xsi:type="ecore:EClass" name="Erwachsener" eSuperTypes="//Person"/>
View
55 ...en/org/eclipse/xtext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/AbstractRule.java
@@ -1,55 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AbstractRule.java,v 1.1 2009/02/06 09:46:50 jkohnlein Exp $
- */
-package org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Rule</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.AbstractRule#getName <em>Name</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.ContentAssistTestLanguagePackage#getAbstractRule()
- * @model
- * @generated
- */
-public interface AbstractRule extends EObject
-{
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.ContentAssistTestLanguagePackage#getAbstractRule_Name()
- * @model
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.AbstractRule#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
-} // AbstractRule
View
55 ...rg/eclipse/xtext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/AbstractRuleCall.java
@@ -1,55 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: AbstractRuleCall.java,v 1.1 2009/02/06 09:46:50 jkohnlein Exp $
- */
-package org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Rule Call</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.AbstractRuleCall#getRule <em>Rule</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.ContentAssistTestLanguagePackage#getAbstractRuleCall()
- * @model
- * @generated
- */
-public interface AbstractRuleCall extends EObject
-{
- /**
- * Returns the value of the '<em><b>Rule</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Rule</em>' reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Rule</em>' reference.
- * @see #setRule(AbstractRule)
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.ContentAssistTestLanguagePackage#getAbstractRuleCall_Rule()
- * @model
- * @generated
- */
- AbstractRule getRule();
-
- /**
- * Sets the value of the '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.AbstractRuleCall#getRule <em>Rule</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Rule</em>' reference.
- * @see #getRule()
- * @generated
- */
- void setRule(AbstractRule value);
-
-} // AbstractRuleCall
View
83 .../testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/ContentAssistTestLanguageFactory.java
@@ -1,83 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: ContentAssistTestLanguageFactory.java,v 1.1 2009/02/06 09:46:50 jkohnlein Exp $
- */
-package org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.ContentAssistTestLanguagePackage
- * @generated
- */
-public interface ContentAssistTestLanguageFactory extends EFactory
-{
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- ContentAssistTestLanguageFactory eINSTANCE = org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.ContentAssistTestLanguageFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Start</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Start</em>'.
- * @generated
- */
- Start createStart();
-
- /**
- * Returns a new object of class '<em>Abstract Rule</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Abstract Rule</em>'.
- * @generated
- */
- AbstractRule createAbstractRule();
-
- /**
- * Returns a new object of class '<em>First Abstract Rule Child</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>First Abstract Rule Child</em>'.
- * @generated
- */
- FirstAbstractRuleChild createFirstAbstractRuleChild();
-
- /**
- * Returns a new object of class '<em>Second Abstract Rule Child</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Second Abstract Rule Child</em>'.
- * @generated
- */
- SecondAbstractRuleChild createSecondAbstractRuleChild();
-
- /**
- * Returns a new object of class '<em>Abstract Rule Call</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Abstract Rule Call</em>'.
- * @generated
- */
- AbstractRuleCall createAbstractRuleCall();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- ContentAssistTestLanguagePackage getContentAssistTestLanguagePackage();
-
-} //ContentAssistTestLanguageFactory
View
442 .../testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/ContentAssistTestLanguagePackage.java
@@ -1,442 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: ContentAssistTestLanguagePackage.java,v 1.1 2009/02/06 09:46:50 jkohnlein Exp $
- */
-package org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.ContentAssistTestLanguageFactory
- * @model kind="package"
- * @generated
- */
-public interface ContentAssistTestLanguagePackage extends EPackage
-{
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "contentAssistTestLanguage";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.eclipse.org/2008/xtext/tests/ContentAssist";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "contentAssistTestLanguage";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- ContentAssistTestLanguagePackage eINSTANCE = org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.ContentAssistTestLanguagePackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.StartImpl <em>Start</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.StartImpl
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.ContentAssistTestLanguagePackageImpl#getStart()
- * @generated
- */
- int START = 0;
-
- /**
- * The feature id for the '<em><b>Rules</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int START__RULES = 0;
-
- /**
- * The number of structural features of the '<em>Start</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int START_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.AbstractRuleImpl <em>Abstract Rule</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.AbstractRuleImpl
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.ContentAssistTestLanguagePackageImpl#getAbstractRule()
- * @generated
- */
- int ABSTRACT_RULE = 1;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_RULE__NAME = 0;
-
- /**
- * The number of structural features of the '<em>Abstract Rule</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_RULE_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.FirstAbstractRuleChildImpl <em>First Abstract Rule Child</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.FirstAbstractRuleChildImpl
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.ContentAssistTestLanguagePackageImpl#getFirstAbstractRuleChild()
- * @generated
- */
- int FIRST_ABSTRACT_RULE_CHILD = 2;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FIRST_ABSTRACT_RULE_CHILD__NAME = ABSTRACT_RULE__NAME;
-
- /**
- * The feature id for the '<em><b>Elements</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FIRST_ABSTRACT_RULE_CHILD__ELEMENTS = ABSTRACT_RULE_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>First Abstract Rule Child</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int FIRST_ABSTRACT_RULE_CHILD_FEATURE_COUNT = ABSTRACT_RULE_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.SecondAbstractRuleChildImpl <em>Second Abstract Rule Child</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.SecondAbstractRuleChildImpl
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.ContentAssistTestLanguagePackageImpl#getSecondAbstractRuleChild()
- * @generated
- */
- int SECOND_ABSTRACT_RULE_CHILD = 3;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SECOND_ABSTRACT_RULE_CHILD__NAME = ABSTRACT_RULE__NAME;
-
- /**
- * The feature id for the '<em><b>Rule</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SECOND_ABSTRACT_RULE_CHILD__RULE = ABSTRACT_RULE_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Second Abstract Rule Child</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SECOND_ABSTRACT_RULE_CHILD_FEATURE_COUNT = ABSTRACT_RULE_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.AbstractRuleCallImpl <em>Abstract Rule Call</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.AbstractRuleCallImpl
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.ContentAssistTestLanguagePackageImpl#getAbstractRuleCall()
- * @generated
- */
- int ABSTRACT_RULE_CALL = 4;
-
- /**
- * The feature id for the '<em><b>Rule</b></em>' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_RULE_CALL__RULE = 0;
-
- /**
- * The number of structural features of the '<em>Abstract Rule Call</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_RULE_CALL_FEATURE_COUNT = 1;
-
-
- /**
- * Returns the meta object for class '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.Start <em>Start</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Start</em>'.
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.Start
- * @generated
- */
- EClass getStart();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.Start#getRules <em>Rules</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Rules</em>'.
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.Start#getRules()
- * @see #getStart()
- * @generated
- */
- EReference getStart_Rules();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.AbstractRule <em>Abstract Rule</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Rule</em>'.
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.AbstractRule
- * @generated
- */
- EClass getAbstractRule();
-
- /**
- * Returns the meta object for the attribute '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.AbstractRule#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.AbstractRule#getName()
- * @see #getAbstractRule()
- * @generated
- */
- EAttribute getAbstractRule_Name();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.FirstAbstractRuleChild <em>First Abstract Rule Child</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>First Abstract Rule Child</em>'.
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.FirstAbstractRuleChild
- * @generated
- */
- EClass getFirstAbstractRuleChild();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.FirstAbstractRuleChild#getElements <em>Elements</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Elements</em>'.
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.FirstAbstractRuleChild#getElements()
- * @see #getFirstAbstractRuleChild()
- * @generated
- */
- EReference getFirstAbstractRuleChild_Elements();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.SecondAbstractRuleChild <em>Second Abstract Rule Child</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Second Abstract Rule Child</em>'.
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.SecondAbstractRuleChild
- * @generated
- */
- EClass getSecondAbstractRuleChild();
-
- /**
- * Returns the meta object for the containment reference '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.SecondAbstractRuleChild#getRule <em>Rule</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Rule</em>'.
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.SecondAbstractRuleChild#getRule()
- * @see #getSecondAbstractRuleChild()
- * @generated
- */
- EReference getSecondAbstractRuleChild_Rule();
-
- /**
- * Returns the meta object for class '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.AbstractRuleCall <em>Abstract Rule Call</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Rule Call</em>'.
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.AbstractRuleCall
- * @generated
- */
- EClass getAbstractRuleCall();
-
- /**
- * Returns the meta object for the reference '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.AbstractRuleCall#getRule <em>Rule</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Rule</em>'.
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.AbstractRuleCall#getRule()
- * @see #getAbstractRuleCall()
- * @generated
- */
- EReference getAbstractRuleCall_Rule();
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- ContentAssistTestLanguageFactory getContentAssistTestLanguageFactory();
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- interface Literals
- {
- /**
- * The meta object literal for the '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.StartImpl <em>Start</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.StartImpl
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.ContentAssistTestLanguagePackageImpl#getStart()
- * @generated
- */
- EClass START = eINSTANCE.getStart();
-
- /**
- * The meta object literal for the '<em><b>Rules</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference START__RULES = eINSTANCE.getStart_Rules();
-
- /**
- * The meta object literal for the '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.AbstractRuleImpl <em>Abstract Rule</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.AbstractRuleImpl
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.ContentAssistTestLanguagePackageImpl#getAbstractRule()
- * @generated
- */
- EClass ABSTRACT_RULE = eINSTANCE.getAbstractRule();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute ABSTRACT_RULE__NAME = eINSTANCE.getAbstractRule_Name();
-
- /**
- * The meta object literal for the '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.FirstAbstractRuleChildImpl <em>First Abstract Rule Child</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.FirstAbstractRuleChildImpl
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.ContentAssistTestLanguagePackageImpl#getFirstAbstractRuleChild()
- * @generated
- */
- EClass FIRST_ABSTRACT_RULE_CHILD = eINSTANCE.getFirstAbstractRuleChild();
-
- /**
- * The meta object literal for the '<em><b>Elements</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference FIRST_ABSTRACT_RULE_CHILD__ELEMENTS = eINSTANCE.getFirstAbstractRuleChild_Elements();
-
- /**
- * The meta object literal for the '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.SecondAbstractRuleChildImpl <em>Second Abstract Rule Child</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.SecondAbstractRuleChildImpl
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.ContentAssistTestLanguagePackageImpl#getSecondAbstractRuleChild()
- * @generated
- */
- EClass SECOND_ABSTRACT_RULE_CHILD = eINSTANCE.getSecondAbstractRuleChild();
-
- /**
- * The meta object literal for the '<em><b>Rule</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference SECOND_ABSTRACT_RULE_CHILD__RULE = eINSTANCE.getSecondAbstractRuleChild_Rule();
-
- /**
- * The meta object literal for the '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.AbstractRuleCallImpl <em>Abstract Rule Call</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.AbstractRuleCallImpl
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.impl.ContentAssistTestLanguagePackageImpl#getAbstractRuleCall()
- * @generated
- */
- EClass ABSTRACT_RULE_CALL = eINSTANCE.getAbstractRuleCall();
-
- /**
- * The meta object literal for the '<em><b>Rule</b></em>' reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference ABSTRACT_RULE_CALL__RULE = eINSTANCE.getAbstractRuleCall_Rule();
-
- }
-
-} //ContentAssistTestLanguagePackage
View
45 ...ipse/xtext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/FirstAbstractRuleChild.java
@@ -1,45 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: FirstAbstractRuleChild.java,v 1.1 2009/02/06 09:46:50 jkohnlein Exp $
- */
-package org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>First Abstract Rule Child</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.FirstAbstractRuleChild#getElements <em>Elements</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.ContentAssistTestLanguagePackage#getFirstAbstractRuleChild()
- * @model
- * @generated
- */
-public interface FirstAbstractRuleChild extends AbstractRule
-{
- /**
- * Returns the value of the '<em><b>Elements</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.AbstractRule}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Elements</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Elements</em>' containment reference list.
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.ContentAssistTestLanguagePackage#getFirstAbstractRuleChild_Elements()
- * @model containment="true"
- * @generated
- */
- EList<AbstractRule> getElements();
-
-} // FirstAbstractRuleChild
View
54 ...pse/xtext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/SecondAbstractRuleChild.java
@@ -1,54 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: SecondAbstractRuleChild.java,v 1.1 2009/02/06 09:46:50 jkohnlein Exp $
- */
-package org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Second Abstract Rule Child</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.SecondAbstractRuleChild#getRule <em>Rule</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.ContentAssistTestLanguagePackage#getSecondAbstractRuleChild()
- * @model
- * @generated
- */
-public interface SecondAbstractRuleChild extends AbstractRule
-{
- /**
- * Returns the value of the '<em><b>Rule</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Rule</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Rule</em>' containment reference.
- * @see #setRule(AbstractRuleCall)
- * @see org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.ContentAssistTestLanguagePackage#getSecondAbstractRuleChild_Rule()
- * @model containment="true"
- * @generated
- */
- AbstractRuleCall getRule();
-
- /**
- * Sets the value of the '{@link org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage.SecondAbstractRuleChild#getRule <em>Rule</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Rule</em>' containment reference.
- * @see #getRule()
- * @generated
- */
- void setRule(AbstractRuleCall value);
-
-} // SecondAbstractRuleChild
View
47 ...s/src-gen/org/eclipse/xtext/testlanguages/contentAssistTestLanguage/contentAssistTestLanguage/Start.java
@@ -1,47 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id: Start.java,v 1.1 2009/02/06 09:46:50 jkohnlein Exp $
- */
-package org.eclipse.xtext.testlanguages.contentAssistTestLanguage.contentAssistTestLanguage;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Start</b></em>'.
- * <!-- end-user-doc -->
- *