Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Willink2016-10-13 08:45:22 +0000
committerEd Willink2016-10-13 15:19:11 +0000
commit79fda756c5103cfd06500e5f85b66b81d1470baf (patch)
tree610008c5571a66d4821bc5327b26cd2c9f4df6ab
parentde698c733a323e2aad4a80f3bfcb50eb37fa1efc (diff)
downloadorg.eclipse.qvtd-79fda756c5103cfd06500e5f85b66b81d1470baf.tar.gz
org.eclipse.qvtd-79fda756c5103cfd06500e5f85b66b81d1470baf.tar.xz
org.eclipse.qvtd-79fda756c5103cfd06500e5f85b66b81d1470baf.zip
[505814] Eliminate assumed existence of source model
-rw-r--r--tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/forward2reverse/Forward2ReverseNormalizer.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/forward2reverse/Forward2ReverseNormalizer.java b/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/forward2reverse/Forward2ReverseNormalizer.java
index 8247f1eb2..c213e37fc 100644
--- a/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/forward2reverse/Forward2ReverseNormalizer.java
+++ b/tests/org.eclipse.qvtd.xtext.qvtrelation.tests/src/org/eclipse/qvtd/xtext/qvtrelation/tests/forward2reverse/Forward2ReverseNormalizer.java
@@ -27,7 +27,6 @@ import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.ocl.examples.xtext.tests.XtextTestCase.Normalizer;
import org.eclipse.ocl.pivot.utilities.ClassUtil;
import org.eclipse.qvtd.xtext.qvtimperative.tests.ModelNormalizer;
-import org.eclipse.qvtd.xtext.qvtrelation.tests.forward2reverse.doublylinkedlist.doublylinkedlistPackage;
/**
* Forward2ReverseNormalizer normalises the results of the Forward2Reverse transformation.
@@ -88,13 +87,13 @@ public class Forward2ReverseNormalizer implements ModelNormalizer
}
EObject eRoot = contents.get(0);
EPackage ePackage = eRoot.eClass().getEPackage();
- EClass elementClass = (EClass) ePackage.getEClassifier(doublylinkedlistPackage.Literals.ELEMENT.getName());
+ EClass elementClass = (EClass) ePackage.getEClassifier("Element");
assert elementClass != null;
- EClass listClass = (EClass) ePackage.getEClassifier(doublylinkedlistPackage.Literals.DOUBLY_LINKED_LIST.getName());
+ EClass listClass = (EClass) ePackage.getEClassifier("DoublyLinkedList");
assert listClass != null;
- EReference listElements = (EReference) listClass.getEStructuralFeature(doublylinkedlistPackage.Literals.DOUBLY_LINKED_LIST__OWNED_ELEMENTS.getName());
+ EReference listElements = (EReference) listClass.getEStructuralFeature("ownedElements");
assert listElements != null;
- EAttribute elementName = (EAttribute) elementClass.getEStructuralFeature(doublylinkedlistPackage.Literals.ELEMENT__NAME.getName());
+ EAttribute elementName = (EAttribute) elementClass.getEStructuralFeature("name");
assert elementName != null;
ElementComparator elementComparator = new ElementComparator(elementName);
for (TreeIterator<EObject> tit = resource.getAllContents(); tit.hasNext(); ) {

Back to the top