svn commit: r17261 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml

Bob Tarling <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2009-08-10 23:49:38-0700
New Revision: 17261

Modified:
   trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java
   trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java

Log:
Implement some of the euml methods that fall over during critics

Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java?view=diff&pathrev=17261&r1=17260&r2=17261
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java	(original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java	2009-08-10 23:49:38-0700
@@ -45,6 +45,7 @@
 import org.eclipse.uml2.uml.Association;
 import org.eclipse.uml2.uml.Behavior;
 import org.eclipse.uml2.uml.BehavioralFeature;
+import org.eclipse.uml2.uml.CallConcurrencyKind;
 import org.eclipse.uml2.uml.Classifier;
 import org.eclipse.uml2.uml.Comment;
 import org.eclipse.uml2.uml.Constraint;
@@ -1334,7 +1335,14 @@
     }
 
     public void setConcurrency(Object handle, Object concurrencyKind) {
-        throw new NotYetImplementedException();
+        if (handle instanceof Operation
+                && concurrencyKind instanceof CallConcurrencyKind) {
+            ((Operation) handle).
+                    setConcurrency((CallConcurrencyKind) concurrencyKind);
+            return;
+        }
+        throw new IllegalArgumentException("handle: " + handle //$NON-NLS-1$
+                + " or concurrencyKind: " + concurrencyKind); //$NON-NLS-1$
     }
 
     public void setConnections(Object handle, Collection ends) {

Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java?view=diff&pathrev=17261&r1=17260&r2=17261
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java	(original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java	2009-08-10 23:49:38-0700
@@ -2043,7 +2043,18 @@
     }
 
     public boolean isConstructor(Object handle) {
-        throw new NotYetImplementedException();
+        if (handle instanceof Operation) {
+            final Operation operation = (Operation) handle;
+        
+            for (Object stereo : getStereotypes(operation)) {
+                if (modelImpl.getExtensionMechanismsHelper()
+                        .isStereotypeInh(stereo, "create",  //$NON-NLS-1$
+                                "BehavioralFeature")) { //$NON-NLS-1$
+                    return true;
+                }
+            }
+        }
+        return false;
     }
 
     public boolean isFrozen(Object handle) {
@@ -2240,5 +2251,4 @@
     public boolean isA(String metatypeName, Object element) {
         return getUMLClassName(element).equals(metatypeName);
     }
-
 }

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2382327

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.