Author: tfmorris
Date: 2008-06-21 09:27:12-0700
New Revision: 15020
Modified:
trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/uml/diagram/sequence2/SequenceDiagramGraphModel.java
Log:
Issue 5151: Fix creation of duplicate top state which is corrupting projects.
Restore copyright and author to seq2 version
Modified: trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/uml/diagram/sequence2/SequenceDiagramGraphModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/uml/diagram/sequence2/SequenceDiagramGraphModel.java?view=diff&rev=15020&p1=trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/uml/diagram/sequence2/SequenceDiagramGraphModel.java&p2=trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/uml/diagram/sequence2/SequenceDiagramGraphModel.java&r1=15019&r2=15020
==============================================================================
--- trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/uml/diagram/sequence2/SequenceDiagramGraphModel.java (original)
+++ trunk/src/argouml-core-diagrams-sequence2/src/org/argouml/uml/diagram/sequence2/SequenceDiagramGraphModel.java 2008-06-21 09:27:12-0700
@@ -1,5 +1,5 @@
// $Id$
-// Copyright (c) 2007 The Regents of the University of California. All
+// Copyright (c) 1996-2008 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
// software and its documentation without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
@@ -30,7 +30,6 @@
import java.beans.VetoableChangeListener;
import java.util.Collection;
import java.util.Hashtable;
-import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -48,6 +47,7 @@
/**
* The sequence graph model is the bridge between the UML meta-model
* representation of the design and the graph model of GEF.
+ * @author [email protected]
* @author penyaskito
*/
public class SequenceDiagramGraphModel extends UMLMutableGraphSupport implements
@@ -278,11 +278,11 @@
/**
* Creates a link based on the given from and toPort. The fromPort
- * should allways point to a MessageCoordinates instance. The toPort
+ * should always point to a MessageCoordinates instance. The toPort
* can point to a MessageCoordinates instance or to a Object
* instance. On a sequence diagram you can only draw Messages. So
* other edgeClasses then links are not supported.
- *
+ * {@inheritDoc}
* @see org.tigris.gef.graph.MutableGraphModel#connect(
* Object, Object, Class)
*/
@@ -399,10 +399,7 @@
if (clsfr == null) {
throw new IllegalStateException("Can not create a Classifier");
}
- Collection c = Model.getFacade().getOwnedElements(clsfr);
- Iterator it = c.iterator();
- while (it.hasNext()) {
- Object child = it.next();
+ for (Object child : Model.getFacade().getOwnedElements(clsfr)) {
if (Model.getFacade().isAStateMachine(child)) {
defaultStateMachine = child;
break;
@@ -411,8 +408,6 @@
if (defaultStateMachine == null) {
defaultStateMachine =
Model.getStateMachinesFactory().buildStateMachine(clsfr);
- Model.getStateMachinesFactory()
- .buildCompositeStateOnStateMachine(defaultStateMachine);
}
}
return defaultStateMachine;
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.