aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-03-04 04:15:28 (EST)
committersefftinge2009-03-04 04:15:28 (EST)
commit9e5927a4c4d3af1a2dc50d3bf5c1f132b435eaa0 (patch)
tree72d4e94925c4452076b67cd12418b2baa491f411
parent74f8cf9788d2c72452131b36af21fbbd944b6aff (diff)
downloadorg.eclipse.xtext-9e5927a4c4d3af1a2dc50d3bf5c1f132b435eaa0.zip
org.eclipse.xtext-9e5927a4c4d3af1a2dc50d3bf5c1f132b435eaa0.tar.gz
org.eclipse.xtext-9e5927a4c4d3af1a2dc50d3bf5c1f132b435eaa0.tar.bz2
Fix: Alias is mandatory if assigned (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=266440)
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GrammarUtilTest.java6
-rwxr-xr-xtests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/XtextGrammarTestLanguage.xtext4
-rwxr-xr-xtests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTestLanguage.xtext2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/XtextParserTest.java8
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/datatyperules/DatatypeRulesTestLanguage.xtext6
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/datatyperules/MetamodelTransformationTest.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/HiddenTerminalsTestLanguage.xtext2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.xtext4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Test.xtext8
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Xtext2EcoreTransformerTest.java27
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/xtext/XtextGrammarSerializationTest.java14
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext28
-rw-r--r--tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext12
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext32
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext12
15 files changed, 97 insertions, 70 deletions
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GrammarUtilTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GrammarUtilTest.java
index 2337d93..03168b3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GrammarUtilTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/GrammarUtilTest.java
@@ -27,7 +27,8 @@ public class GrammarUtilTest extends AbstractGeneratorTest {
with(XtextStandaloneSetup.class);
String model = "grammar foo with org.eclipse.xtext.common.Terminals " +
"import 'http://www.eclipse.org/emf/2002/Ecore' as ecore " +
- "generate g 'http://3' as ecore startrule: name=ID;";
+ "generate g 'http://3' as ecore " +
+ "startrule returns ecore::startrule: name=ID;";
Resource r = getResourceFromString(model);
assertTrue(r.getErrors().isEmpty());
Grammar g = (Grammar) r.getContents().get(0);
@@ -51,7 +52,8 @@ public class GrammarUtilTest extends AbstractGeneratorTest {
with(XtextStandaloneSetup.class);
String model = "grammar foo with org.eclipse.xtext.common.Terminals " +
"import 'http://www.eclipse.org/emf/2002/Ecore' as bar " +
- "generate g 'http://3' as bar startrule: name=ID;";
+ "generate g 'http://3' as bar " +
+ "startrule returns bar::startrule: name=ID;";
Resource r = getResourceFromString(model);
assertTrue(r.getErrors().isEmpty());
Grammar g = (Grammar) r.getContents().get(0);
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/XtextGrammarTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/XtextGrammarTestLanguage.xtext
index fd086a3..8ab7ee8 100755
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/XtextGrammarTestLanguage.xtext
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/XtextGrammarTestLanguage.xtext
@@ -18,7 +18,7 @@ Grammar:
(rules+=AbstractRule)+
;
-GrammarID returns EString:
+GrammarID returns ecore::EString:
ID ('.' ID)*;
AbstractRule : ParserRule | TerminalRule;
@@ -43,7 +43,7 @@ ParserRule :
;
TypeRef :
- (metamodel=[AbstractMetamodelDeclaration] '::')? classifier=[EClassifier]
+ (metamodel=[AbstractMetamodelDeclaration] '::')? classifier=[ecore::EClassifier]
;
Alternatives returns AbstractElement:
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTestLanguage.xtext
index 7666abb..745c152 100755
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTestLanguage.xtext
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/MetamodelRefTestLanguage.xtext
@@ -15,7 +15,7 @@ Foo :
name=ID (nameRefs+=NameRef)*;
NameRef returns xtext::RuleCall :
- rule=[ParserRule];
+ rule=[xtext::ParserRule];
MyRule returns xtext::ParserRule :
name=ID; \ No newline at end of file
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/XtextParserTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/XtextParserTest.java
index f17de8a..eac7d63 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/XtextParserTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/XtextParserTest.java
@@ -20,12 +20,16 @@ public class XtextParserTest extends AbstractGeneratorTest {
}
public void test_resolveReturnType() throws Exception {
- Grammar model = (Grammar) getModel("grammar foo generate foo 'bar' as x Model returns x::Foo : 'holla' name=ID;");
+ Grammar model = (Grammar) getModel("grammar foo with org.eclipse.xtext.common.Terminals " +
+ "generate foo 'bar' as x Model returns x::Foo : 'holla' name=ID;");
assertWithXtend("'x'", "metamodelDeclarations.first().alias", model);
}
public void testParseCrossRef() throws Exception {
- Grammar model = (Grammar) getModel("grammar foo generate foo 'bar' as boo Model : 'a' stuff+=Stuff*; Stuff : 'stuff' name=ID refersTo=[Stuff];");
+ Grammar model = (Grammar) getModel("grammar foo with org.eclipse.xtext.common.Terminals " +
+ "generate foo 'bar' as boo " +
+ "Model returns boo::Model : 'a' stuff+=Stuff*; " +
+ "Stuff returns boo::Stuff : 'stuff' name=ID refersTo=[boo::Stuff];");
assertWithXtend("'boo'", "eAllContents.typeSelect(xtext::CrossReference).first().type.metamodel.alias", model);
assertWithXtend("'Stuff'", "eAllContents.typeSelect(xtext::CrossReference).first().type.classifier.name", model);
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/datatyperules/DatatypeRulesTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/datatyperules/DatatypeRulesTestLanguage.xtext
index b06dec2..d3ff31c 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/datatyperules/DatatypeRulesTestLanguage.xtext
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/datatyperules/DatatypeRulesTestLanguage.xtext
@@ -23,11 +23,11 @@ ModelId returns ecore::EString:
NestedModelId :
ModelId '.' ModelId;
-Fraction returns EBigDecimal:
+Fraction returns ecore::EBigDecimal:
INT ('/' INT)?;
Vector :
'(' INT INT ')';
-Dots returns EString:
- ( '.' '.' ) | '..'; \ No newline at end of file
+Dots returns ecore::EString:
+ ( '.' '.' ) | '..';
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/datatyperules/MetamodelTransformationTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/datatyperules/MetamodelTransformationTest.java
index 5b7fa96..754ebed 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/datatyperules/MetamodelTransformationTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/datatyperules/MetamodelTransformationTest.java
@@ -32,7 +32,7 @@ public class MetamodelTransformationTest extends AbstractGeneratorTest {
"generate metamodel 'http://fooo'\n" +
"Start:\n" +
" id=StartId id2=RecursiveId id3=CalledId value=Value;\n" +
- "StartId returns EInt: ID '.' (ID|INT);\n" +
+ "StartId returns ecore::EInt: ID '.' (ID|INT);\n" +
"RecursiveId: ID ('/' RecursiveId)?;\n" +
"CalledId: StartId '-' ID;\n" +
"Value: name=StartId;";
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/HiddenTerminalsTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/HiddenTerminalsTestLanguage.xtext
index 82f74ca..58e6255 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/HiddenTerminalsTestLanguage.xtext
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/HiddenTerminalsTestLanguage.xtext
@@ -33,7 +33,7 @@ InheritingHiddens hidden(WS, ML_COMMENT, SL_COMMENT):
DatatypeHiddens:
'datatype' valid?=DatatypeRule;
-DatatypeRule returns EString hidden(WS):
+DatatypeRule returns ecore::EString hidden(WS):
'rule' ';';
HidingHiddens hidden():
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.xtext
index 22af0e6..e1957ad 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.xtext
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.xtext
@@ -17,7 +17,7 @@ Grammar:
(rules+=AbstractRule)+
;
-GrammarID returns EString:
+GrammarID returns ecore::EString:
ID ('.' ID)*;
AbstractRule : ParserRule | TerminalRule;
@@ -42,7 +42,7 @@ ParserRule :
;
TypeRef :
- (metamodel=[AbstractMetamodelDeclaration] '::')? classifier=[EClassifier]
+ (metamodel=[AbstractMetamodelDeclaration] '::')? classifier=[ecore::EClassifier]
;
Alternatives returns AbstractElement:
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Test.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Test.xtext
index a7e0686..9dcb76d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Test.xtext
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Test.xtext
@@ -14,16 +14,16 @@ Optional returns test::Optional :
optionalString=ID
optionalInt=INT
optionalBoolean?="foo"
- optionalReference=[Mandatory]
- optionalMultivaluedReference+=[Mandatory]
+ optionalReference=[test::Mandatory]
+ optionalMultivaluedReference+=[test::Mandatory]
;
Mandatory returns test::Mandatory :
mandatoryString=ID
mandatoryInt=INT
mandatoryBoolean?="foo"
- mandatoryReference=[Optional]
- mandatoryMultivaluedReference+=[Optional]
+ mandatoryReference=[test::Optional]
+ mandatoryMultivaluedReference+=[test::Optional]
;
ObjectTypes returns test::ObjectTypes :
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Xtext2EcoreTransformerTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Xtext2EcoreTransformerTest.java
index 50cf867..9f332a1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Xtext2EcoreTransformerTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/resource/metamodel/Xtext2EcoreTransformerTest.java
@@ -27,7 +27,6 @@ import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.Resource.Diagnostic;
import org.eclipse.xtext.AbstractRule;
@@ -913,10 +912,32 @@ public class Xtext2EcoreTransformerTest extends AbstractGeneratorTest {
XtextResource resource = getResourceFromString(grammar);
assertTrue(resource.getErrors().isEmpty());
}
+
+ /**
+ * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=266440
+ */
+ public void testBug_266440() throws Exception {
+ String grammar = "grammar test with org.eclipse.xtext.common.Terminals" +
+ " import 'http://www.eclipse.org/emf/2002/Ecore' as ecore " +
+ " generate bugreport 'http://bugreport/266440'\n" +
+ "CompositeModel: (type+=EClassifier)+;\n" +
+ "EClassifier: EDataType | EClass;\n" +
+ "EClass: 'class' name=ID;\n" +
+ "EDataType: 'dt' name=ID;";
+ XtextResource resource = getResourceFromString(grammar);
+ assertTrue(resource.getErrors().isEmpty());
+ Grammar parsedGrammar = (Grammar) resource.getContents().get(0);
+ for(AbstractRule rule: parsedGrammar.getRules()) {
+ EClassifier classifier = rule.getType().getClassifier();
+ EPackage pack = classifier.getEPackage();
+ assertEquals("bugreport", pack.getName());
+ }
+ }
+
/**
- * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=266807
+ * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=266807
*/
- public void testBug266807() throws Exception {
+ public void testBug_266807() throws Exception {
with(new XtextStandaloneSetup());
XtextResourceSet rs = get(XtextResourceSet.class);
rs.setClasspathURIContext(getClass());
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/xtext/XtextGrammarSerializationTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/xtext/XtextGrammarSerializationTest.java
index 9f75d91..8afd034 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/xtext/XtextGrammarSerializationTest.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/xtext/XtextGrammarSerializationTest.java
@@ -34,10 +34,10 @@ public class XtextGrammarSerializationTest extends AbstractGeneratorTest {
public void testSimpleSerialization() throws Exception {
final String model = "grammar foo with org.eclipse.xtext.common.Terminals\n"
+ "generate mm \"http://bar\" as fooMM\n"
- + "StartRule returns T: name=ID;";
+ + "StartRule returns fooMM::T: name=ID;";
final String expectedModel = "grammar foo with org.eclipse.xtext.common.Terminals\n" + "\n"
+ "generate mm \"http://bar\" as fooMM\n" + "\n"
- + "StartRule returns T:\n" + " name=ID;";
+ + "StartRule returns fooMM::T:\n" + " name=ID;";
doTestSerialization(model, expectedModel);
}
@@ -56,15 +56,15 @@ public class XtextGrammarSerializationTest extends AbstractGeneratorTest {
final String model = "grammar foo with org.eclipse.xtext.common.Terminals\n"
+ "import \"http://www.eclipse.org/2008/Xtext\" as xtext\n"
+ "generate mm \"http://bar\" as fooMM\n"
- + "Foo : name=ID (nameRefs+=NameRef)*;\n"
- + "NameRef returns xtext::RuleCall : rule=[ParserRule];\n"
+ + "Foo returns fooMM::Foo: name=ID (nameRefs+=NameRef)*;\n"
+ + "NameRef returns xtext::RuleCall : rule=[xtext::ParserRule];\n"
+ "MyRule returns xtext::ParserRule : name=ID;";
final String expectedModel = "grammar foo with org.eclipse.xtext.common.Terminals\n" + "\n"
+ "import \"http://www.eclipse.org/2008/Xtext\" as xtext\n"
+ "\n" + "generate mm \"http://bar\" as fooMM\n" + "\n"
- + "Foo:\n" + " name=ID (nameRefs+=NameRef)*;\n" + "\n"
- + "NameRef returns RuleCall:\n" + " rule=[ParserRule];\n"
- + "\n" + "MyRule returns ParserRule:\n" + " name=ID;";
+ + "Foo returns fooMM::Foo:\n" + " name=ID (nameRefs+=NameRef)*;\n" + "\n"
+ + "NameRef returns xtext::RuleCall:\n" + " rule=[xtext::ParserRule];\n"
+ + "\n" + "MyRule returns xtext::ParserRule:\n" + " name=ID;";
doTestSerialization(model, expectedModel);
}
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
index acb0a17..396a8a3 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
+++ b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
@@ -17,16 +17,22 @@ extension org::eclipse::xtend::util::stdlib::io;
*/
+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_hiddenTokens(Grammar 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_usedGrammars(Grammar this):
- allElements().typeSelect(Grammar).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_hiddenTokens(ParserRule this):
+ allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_usedGrammars(emf::EObject this) :
+List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_metamodel(TypeRef this):
@@ -35,27 +41,21 @@ List[IScopedElement] scope_metamodel(TypeRef this):
List[IScopedElement] scope_metamodel(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_classifier(TypeRef this):
allElements().typeSelect(ecore::EClassifier).collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_classifier(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_hiddenTokens(ParserRule this):
+List[IScopedElement] scope_rule(RuleCall this):
allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
+List[IScopedElement] scope_rule(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_usedGrammars(Grammar this):
+ allElements().typeSelect(Grammar).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_rule(emf::EObject this) :
+List[IScopedElement] scope_usedGrammars(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
diff --git a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
index 7948696..e112e8f 100644
--- a/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
+++ b/tests/org.eclipse.xtext.ui.common.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
@@ -16,18 +16,18 @@ 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_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));
+
List[IScopedElement] scope_vater(Familie this):
allElements().typeSelect(Erwachsener).collect(x | createScopedElement(x.referenceName(), x));
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
index 88fee57..b98161c 100644
--- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
+++ b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext
@@ -17,16 +17,22 @@ extension org::eclipse::xtend::util::stdlib::io;
*/
-List[IScopedElement] scope_usedGrammars(Grammar this):
- allElements().typeSelect(Grammar).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_metamodel(TypeRef this):
+ allElements().typeSelect(AbstractMetamodelDeclaration).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_usedGrammars(emf::EObject this) :
+List[IScopedElement] scope_metamodel(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_rule(RuleCall this):
+List[IScopedElement] scope_classifier(TypeRef this):
+ allElements().typeSelect(ecore::EClassifier).collect(x | createScopedElement(x.referenceName(), x));
+
+List[IScopedElement] scope_classifier(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_rule(emf::EObject this) :
+List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_ePackage(AbstractMetamodelDeclaration this):
@@ -35,16 +41,10 @@ List[IScopedElement] scope_ePackage(AbstractMetamodelDeclaration this):
List[IScopedElement] scope_ePackage(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_classifier(TypeRef this):
- allElements().typeSelect(ecore::EClassifier).collect(x | createScopedElement(x.referenceName(), x));
-
-List[IScopedElement] scope_classifier(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_usedGrammars(Grammar this):
+ allElements().typeSelect(Grammar).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_metamodel(emf::EObject this) :
+List[IScopedElement] scope_usedGrammars(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_hiddenTokens(Grammar this):
@@ -53,9 +53,9 @@ List[IScopedElement] scope_hiddenTokens(Grammar this):
List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_hiddenTokens(ParserRule this):
+List[IScopedElement] scope_rule(RuleCall this):
allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
+List[IScopedElement] scope_rule(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
index 7948696..efbcf20 100644
--- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
+++ b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext
@@ -16,12 +16,6 @@ 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_kinder(Familie this):
allElements().typeSelect(Kind).collect(x | createScopedElement(x.referenceName(), x));
@@ -34,3 +28,9 @@ List[IScopedElement] scope_vater(Familie this):
List[IScopedElement] scope_vater(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));
+