commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gu...@apache.org
Subject svn commit: r949460 - in /commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram: edit/commands/State3CreateCommand.java part/ModelingDiagramUpdater.java
Date Sun, 30 May 2010 02:26:13 GMT
Author: guixl
Date: Sun May 30 02:26:12 2010
New Revision: 949460

URL: http://svn.apache.org/viewvc?rev=949460&view=rev
Log:
amend data model : State has 0 or more sub States

Modified:
    commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/edit/commands/State3CreateCommand.java
    commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingDiagramUpdater.java

Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/edit/commands/State3CreateCommand.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/edit/commands/State3CreateCommand.java?rev=949460&r1=949459&r2=949460&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/edit/commands/State3CreateCommand.java
(original)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/edit/commands/State3CreateCommand.java
Sun May 30 02:26:12 2010
@@ -51,17 +51,6 @@ public class State3CreateCommand extends
 	/**
 	 * @generated
 	 */
-	public boolean canExecute() {
-		State container = (State) getElementToEdit();
-		if (container.getSubState() != null) {
-			return false;
-		}
-		return true;
-	}
-
-	/**
-	 * @generated
-	 */
 	protected EClass getEClassToEdit() {
 		return ModelingPackage.eINSTANCE.getState();
 	}

Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingDiagramUpdater.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingDiagramUpdater.java?rev=949460&r1=949459&r2=949460&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingDiagramUpdater.java
(original)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingDiagramUpdater.java
Sun May 30 02:26:12 2010
@@ -293,12 +293,13 @@ public class ModelingDiagramUpdater {
 				continue;
 			}
 		}
-		{
-			State childElement = modelElement.getSubState();
+		for (Iterator it = modelElement.getSubState().iterator(); it.hasNext();) {
+			State childElement = (State) it.next();
 			int visualID = ModelingVisualIDRegistry.getNodeVisualID(view,
 					childElement);
 			if (visualID == State3EditPart.VISUAL_ID) {
 				result.add(new ModelingNodeDescriptor(childElement, visualID));
+				continue;
 			}
 		}
 		return result;
@@ -1045,12 +1046,13 @@ public class ModelingDiagramUpdater {
 				continue;
 			}
 		}
-		{
-			State childElement = modelElement.getSubState();
+		for (Iterator it = modelElement.getSubState().iterator(); it.hasNext();) {
+			State childElement = (State) it.next();
 			int visualID = ModelingVisualIDRegistry.getNodeVisualID(view,
 					childElement);
 			if (visualID == State3EditPart.VISUAL_ID) {
 				result.add(new ModelingNodeDescriptor(childElement, visualID));
+				continue;
 			}
 		}
 		return result;
@@ -1374,12 +1376,13 @@ public class ModelingDiagramUpdater {
 				continue;
 			}
 		}
-		{
-			State childElement = modelElement.getSubState();
+		for (Iterator it = modelElement.getSubState().iterator(); it.hasNext();) {
+			State childElement = (State) it.next();
 			int visualID = ModelingVisualIDRegistry.getNodeVisualID(view,
 					childElement);
 			if (visualID == State3EditPart.VISUAL_ID) {
 				result.add(new ModelingNodeDescriptor(childElement, visualID));
+				continue;
 			}
 		}
 		return result;



Mime
View raw message