summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszarnekow2009-02-16 08:00:44 (EST)
committer sefftinge2009-02-16 08:00:44 (EST)
commit23b4f8ff5dffa570e2483895a28979ca9fa1d6e9 (patch)
tree72e132dc6e6148fe39209b36a747779848291bcb
parent9c89c6b2ea3694e291c6ccda90cc9700f9fe6ba2 (diff)
downloadorg.eclipse.xtext-23b4f8ff5dffa570e2483895a28979ca9fa1d6e9.zip
org.eclipse.xtext-23b4f8ff5dffa570e2483895a28979ca9fa1d6e9.tar.gz
org.eclipse.xtext-23b4f8ff5dffa570e2483895a28979ca9fa1d6e9.tar.bz2
Fix: derived ecore packages should be equal on subsequent executions of the generator for the same grammar when they are serialized (closes: https://bugs.eclipse.org/bugs/show_bug.cgi?id=264490)
-rw-r--r--devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.ecore6
-rw-r--r--examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/domainmodel.ecore2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.ecore2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.ecore6
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/GenXtextGrammarTestLanguageScopeProvider.ext38
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/XtextTest.ecore8
-rw-r--r--tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/testlanguages/GenReferenceGrammarTestLanguageScopeProvider.ext12
7 files changed, 37 insertions, 37 deletions
diff --git a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.ecore b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.ecore
index e9ccfbe..dfce531 100644
--- a/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.ecore
+++ b/devtools/org.eclipse.xtext.reference/src-gen/org/eclipse/xtext/reference/ReferenceGrammar.ecore
@@ -16,12 +16,12 @@
</eStructuralFeatures>
</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"/>
diff --git a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/domainmodel.ecore b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/domainmodel.ecore
index 00627f8..1b4861b 100644
--- a/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/domainmodel.ecore
+++ b/examples/org.eclipse.xtext.example.domainmodel/src-gen/org/eclipse/xtext/example/domainmodel.ecore
@@ -34,10 +34,10 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Parameter" eSuperTypes="//TypedElement"/>
<eClassifiers xsi:type="ecore:EClass" name="TypedElement">
- <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="//TypeRef" containment="true"/>
<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:EReference" name="type" eType="//TypeRef" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="TypeRef">
<eStructuralFeatures xsi:type="ecore:EReference" name="referenced" eType="//Type"/>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.ecore
index 395a5c8..aa0a3c0 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.ecore
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/epatch/EpatchTestLanguage.ecore
@@ -48,11 +48,11 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="rightRoot" eType="//CreatedObject" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="NamedObject">
- <eStructuralFeatures xsi:type="ecore:EReference" name="leftMig" eType="//Migration" containment="true"/>
<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:EReference" name="assignments" upperBound="-1" eType="//Assignment" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="leftMig" eType="//Migration" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ObjectRef" eSuperTypes="//NamedObject">
<eStructuralFeatures xsi:type="ecore:EReference" name="leftRes" eType="//NamedResource"/>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.ecore
index 5c5954f..2da5ce6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.ecore
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/terminalrules/XtextTerminalsTestLanguage.ecore
@@ -22,12 +22,12 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="//TypeRef" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AbstractMetamodelDeclaration">
- <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>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="alias">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GeneratedMetamodel" eSuperTypes="//AbstractMetamodelDeclaration">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
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 d090763..8d6fd84 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,22 +17,16 @@ extension org::eclipse::xtend::util::stdlib::io;
*/
-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_hiddenTokens(Grammar this):
- allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_superGrammar(Grammar this):
+ allElements().typeSelect(Grammar).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
+List[IScopedElement] scope_superGrammar(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_type(TypeRef this):
+ allElements().typeSelect(ecore::EClassifier).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
+List[IScopedElement] scope_type(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_metamodel(TypeRef this):
@@ -41,25 +35,31 @@ List[IScopedElement] scope_metamodel(TypeRef this):
List[IScopedElement] scope_metamodel(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_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_superGrammar(Grammar this):
- allElements().typeSelect(Grammar).collect(x | createScopedElement(x.referenceName(), x));
+List[IScopedElement] scope_rule(RuleCall this):
+ allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_superGrammar(emf::EObject this) :
+List[IScopedElement] scope_rule(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_hiddenTokens(ParserRule this):
+ allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_type(emf::EObject this) :
+List[IScopedElement] scope_hiddenTokens(emf::EObject this) :
allElements().collect(x | createScopedElement(x.referenceName(), x));
-List[IScopedElement] scope_rule(RuleCall this):
+List[IScopedElement] scope_rule(CrossReference this):
allElements().typeSelect(AbstractRule).collect(x | createScopedElement(x.referenceName(), x));
List[IScopedElement] scope_rule(emf::EObject this) :
diff --git a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/XtextTest.ecore b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/XtextTest.ecore
index ae9485c..8a9eada 100644
--- a/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/XtextTest.ecore
+++ b/tests/org.eclipse.xtext.xtend.tests/src-gen/org/eclipse/xtext/XtextTest.ecore
@@ -16,18 +16,18 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="rules" upperBound="-1" eType="//AbstractRule" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AbstractRule">
- <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="//TypeRef" containment="true"/>
<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:EReference" name="type" eType="//TypeRef" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AbstractMetamodelDeclaration">
- <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>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="alias">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GeneratedMetamodel" eSuperTypes="//AbstractMetamodelDeclaration">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
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 c586f67..9a38ee7 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,18 +16,18 @@ extension org::eclipse::xtend::util::stdlib::io;
*/
-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_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_mutter(Familie this):
allElements().typeSelect(Erwachsener).collect(x | createScopedElement(x.referenceName(), x));