Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeremie.tatibouet2015-05-04 13:24:49 +0000
committerArnaud Cuccuru2015-05-05 16:47:26 +0000
commit67d24a73dcbbe539c906905c1f7788b1265ff11c (patch)
tree8ac3747985e5c0251ae8bb8f918fdf0f2636964b /extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction
parentb8e467cba2b0fb654c7d8c10e43de9c5f526c6b1 (diff)
downloadorg.eclipse.papyrus-67d24a73dcbbe539c906905c1f7788b1265ff11c.tar.gz
org.eclipse.papyrus-67d24a73dcbbe539c906905c1f7788b1265ff11c.tar.xz
org.eclipse.papyrus-67d24a73dcbbe539c906905c1f7788b1265ff11c.zip
Enables the ALF editor when an operation is selected. Still some merge
problem at this step (e.g. the implementation of an operation not referenced in the "method" list after a compilation). Change-Id: I6cd85e10180d9b113fd5a77d23ac572c9426000c Signed-off-by: jeremie.tatibouet <jeremie.tatibouet@cea.fr> Reviewed-on: https://git.eclipse.org/r/47155 Tested-by: Hudson CI Reviewed-by: Arnaud Cuccuru <arnaud.cuccuru@cea.fr> Tested-by: Arnaud Cuccuru <arnaud.cuccuru@cea.fr>
Diffstat (limited to 'extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction')
-rw-r--r--extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/filter/FUMLScopeUtil.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/filter/FUMLScopeUtil.java b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/filter/FUMLScopeUtil.java
index 6426cf6a2a8..d80116956a0 100644
--- a/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/filter/FUMLScopeUtil.java
+++ b/extraplugins/alf/core/org.eclipse.papyrus.uml.alf.transaction/src/org/eclipse/papyrus/uml/alf/transaction/observation/listener/filter/FUMLScopeUtil.java
@@ -181,6 +181,23 @@ public class FUMLScopeUtil {
return notifier instanceof Operation;
}
+ /**
+ * This predictate is only valid if:
+ * 1 - the notified is an Operation
+ * 2 - the operation is not abstract
+ * 3 - there is only one implementation for the operation
+ * 4 - the implementation is given as an activity
+ *
+ * @param notifier
+ *
+ * @return true if constraint is verified false otherwise
+ */
+ public static boolean isOperationWithImplementation(Object notifier){
+ return isOperation(notifier)
+ && !((Operation)notifier).isAbstract()
+ && ((Operation)notifier).getMethods().size()==1
+ && ((Operation)notifier).getMethods().get(0) instanceof Activity;
+ }
/**
* Check if the given notifier is strictly a Reception

Back to the top