svn commit: r19386 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2011-05-09 13:04:43-0700
New Revision: 19386

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

Log:
Implement some state methods

Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java?view=diff&pathrev=19386&r1=19385&r2=19386
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java	(original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/StateMachinesFactoryEUMLImpl.java	2011-05-09 13:04:43-0700
@@ -17,6 +17,7 @@
 import org.argouml.model.Model;
 import org.argouml.model.StateMachinesFactory;
 import org.eclipse.uml2.uml.BehavioredClassifier;
+import org.eclipse.uml2.uml.FinalState;
 import org.eclipse.uml2.uml.Region;
 import org.eclipse.uml2.uml.State;
 import org.eclipse.uml2.uml.StateMachine;
@@ -215,15 +216,15 @@
     }
 
     public Object createCompositeState() {
-        // TODO: Auto-generated method stub
-        throw new NotYetImplementedException();
-
+        // A composite state contains at least one region
+        State state = UMLFactory.eINSTANCE.createState();
+        Region region = UMLFactory.eINSTANCE.createRegion();
+        state.getRegions().add(region);
+        return state;
     }
 
     public Object createFinalState() {
-        // TODO: Auto-generated method stub
-        throw new NotYetImplementedException();
-
+        return UMLFactory.eINSTANCE.createFinalState();
     }
 
     public Object createGuard() {
@@ -241,9 +242,7 @@
     }
 
     public Object createSimpleState() {
-        // TODO: Auto-generated method stub
-        throw new NotYetImplementedException();
-
+        return UMLFactory.eINSTANCE.createState();
     }
 
     public Object createStateMachine() {

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

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.