summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoritz Eysholdt2011-08-09 12:45:25 (EDT)
committer Ed Merks2011-08-09 12:45:25 (EDT)
commitea4a54f2a7e0097972034323b5523090b6f648c6 (patch)
tree8c04972743b0210cf1c45c46a85e0ff3dc1b860a
parent1c73a6df9b032fe8108def2a0fc76de10f962398 (diff)
downloadorg.eclipse.emf-ea4a54f2a7e0097972034323b5523090b6f648c6.zip
org.eclipse.emf-ea4a54f2a7e0097972034323b5523090b6f648c6.tar.gz
org.eclipse.emf-ea4a54f2a7e0097972034323b5523090b6f648c6.tar.bz2
don't test references to container
-rw-r--r--org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/EObjectFormatter.java6
-rw-r--r--org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenFeatures1.xcore2
-rw-r--r--org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenPackage1.xcore1
3 files changed, 5 insertions, 4 deletions
diff --git a/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/EObjectFormatter.java b/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/EObjectFormatter.java
index 1f02877..efe6148 100644
--- a/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/EObjectFormatter.java
+++ b/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/EObjectFormatter.java
@@ -152,7 +152,11 @@ public class EObjectFormatter implements Function<EObject, String>
protected boolean shouldFormat(EObject object, EStructuralFeature feature)
{
- return !feature.isDerived() && object.eIsSet(feature);
+ if (feature.isDerived())
+ return false;
+ if (feature instanceof EReference && ((EReference) feature).isContainer())
+ return false;
+ return object.eIsSet(feature);
}
protected boolean shouldFormat(EObject object, EStructuralFeature feature, int index, Object value)
diff --git a/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenFeatures1.xcore b/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenFeatures1.xcore
index 649c5cd..fade518 100644
--- a/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenFeatures1.xcore
+++ b/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenFeatures1.xcore
@@ -9,7 +9,6 @@ class X
notify = 'false'
createChild = 'false'
propertySortChoices = 'true'
- genClass -> GenClass foo.X
ecoreFeature -> EReference foo::X::x
}
--- */
@@ -20,7 +19,6 @@ class X
notify = 'false'
createChild = 'false'
propertySortChoices = 'true'
- genClass -> GenClass foo.X
ecoreFeature -> EReference foo::X::y
}
--- */
diff --git a/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenPackage1.xcore b/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenPackage1.xcore
index 1db8be8..35473e4 100644
--- a/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenPackage1.xcore
+++ b/org.eclipse.emf.ecore.xcore.tests/src/org/eclipse/emf/ecore/xcore/tests/genmodel/GenPackage1.xcore
@@ -5,7 +5,6 @@
prefix = 'Foo'
disposableProviderFactory = 'true'
ecorePackage -> EPackage foo
- genModel -> GenModel Foo
genClasses = [
GenClass {
genPackage -> GenPackage foo.FooPackage