Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2009-01-10 12:31:05 -0500
committerashatalin2009-01-10 12:31:05 -0500
commit7348aba1e82f6353e790f85ada8b628c83823dc3 (patch)
tree989249b865d05b027eb7d73372c8e0552af6594b
parentacff15fc36ab54a9cacb9e5d8fac5d339df832f9 (diff)
downloadorg.eclipse.gmf-tooling-7348aba1e82f6353e790f85ada8b628c83823dc3.tar.gz
org.eclipse.gmf-tooling-7348aba1e82f6353e790f85ada8b628c83823dc3.tar.xz
org.eclipse.gmf-tooling-7348aba1e82f6353e790f85ada8b628c83823dc3.zip
Migration of .indexof <>=!= -1/0 operation as ->contains() was added.
-rw-r--r--tests/org.eclipse.gmf.tests.xpand.migration/resources/org/eclipse/gmf/tests/xpand/migration/OperationCall_CollectionOperations.ext20
-rw-r--r--tests/org.eclipse.gmf.tests.xpand.migration/resources/org/eclipse/gmf/tests/xpand/migration/OperationCall_CollectionOperations.qvto20
2 files changed, 40 insertions, 0 deletions
diff --git a/tests/org.eclipse.gmf.tests.xpand.migration/resources/org/eclipse/gmf/tests/xpand/migration/OperationCall_CollectionOperations.ext b/tests/org.eclipse.gmf.tests.xpand.migration/resources/org/eclipse/gmf/tests/xpand/migration/OperationCall_CollectionOperations.ext
index 49a3968b7..e530cd694 100644
--- a/tests/org.eclipse.gmf.tests.xpand.migration/resources/org/eclipse/gmf/tests/xpand/migration/OperationCall_CollectionOperations.ext
+++ b/tests/org.eclipse.gmf.tests.xpand.migration/resources/org/eclipse/gmf/tests/xpand/migration/OperationCall_CollectionOperations.ext
@@ -253,4 +253,24 @@ List[ecore::EJavaObject] purgeDupsOp(List[ecore::EClass] eClasses) :
Integer indexOfOp(List[ecore::EClass] eClasses, ecore::EJavaObject param) :
eClasses.indexOf(param)
+;
+
+Boolean hasNoIndexOfEqual(List[ecore::EClass] eClasses, ecore::EClass param) :
+ eClasses.indexOf(param) == -1
+;
+
+Boolean hasNoIndexOfLess(List[ecore::EClass] eClasses, ecore::EClass param) :
+ eClasses.indexOf(param) < 0
+;
+
+Boolean hasIndexOfNotEqual(List[ecore::EClass] eClasses, ecore::EClass param) :
+ eClasses.indexOf(param) != -1
+;
+
+Boolean hasIndexOfGreaterOrEqual(List[ecore::EClass] eClasses, ecore::EClass param) :
+ eClasses.indexOf(param) >= 0
+;
+
+Boolean hasIndexOfGreater(List[ecore::EClass] eClasses, ecore::EClass param) :
+ eClasses.indexOf(param) > -1
; \ No newline at end of file
diff --git a/tests/org.eclipse.gmf.tests.xpand.migration/resources/org/eclipse/gmf/tests/xpand/migration/OperationCall_CollectionOperations.qvto b/tests/org.eclipse.gmf.tests.xpand.migration/resources/org/eclipse/gmf/tests/xpand/migration/OperationCall_CollectionOperations.qvto
index 4fa663669..f997ea25b 100644
--- a/tests/org.eclipse.gmf.tests.xpand.migration/resources/org/eclipse/gmf/tests/xpand/migration/OperationCall_CollectionOperations.qvto
+++ b/tests/org.eclipse.gmf.tests.xpand.migration/resources/org/eclipse/gmf/tests/xpand/migration/OperationCall_CollectionOperations.qvto
@@ -244,4 +244,24 @@ helper purgeDupsOp(eClasses : Sequence(ecore::EClass)) : Sequence(OclAny) {
helper indexOfOp(eClasses : Sequence(ecore::EClass), param : OclAny) : Integer {
return ((eClasses)[OclAny]->indexOf(param) - 1)
+}
+
+helper hasNoIndexOfEqual(eClasses : Sequence(ecore::EClass), param : ecore::EClass) : Boolean {
+ return not eClasses->includes(param)
+}
+
+helper hasNoIndexOfLess(eClasses : Sequence(ecore::EClass), param : ecore::EClass) : Boolean {
+ return not eClasses->includes(param)
+}
+
+helper hasIndexOfNotEqual(eClasses : Sequence(ecore::EClass), param : ecore::EClass) : Boolean {
+ return eClasses->includes(param)
+}
+
+helper hasIndexOfGreaterOrEqual(eClasses : Sequence(ecore::EClass), param : ecore::EClass) : Boolean {
+ return eClasses->includes(param)
+}
+
+helper hasIndexOfGreater(eClasses : Sequence(ecore::EClass), param : ecore::EClass) : Boolean {
+ return eClasses->includes(param)
} \ No newline at end of file

Back to the top