commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gu...@apache.org
Subject svn commit: r945185 [26/42] - in /commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram: ./ META-INF/ bin/ icons/ icons/obj16/ icons/wizban/ src/ src/org/ src/org/apache/ src/org/apache/commons/ src/org/apache/com...
Date Mon, 17 May 2010 14:38:59 GMT
Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitItemSemanticEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitItemSemanticEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitItemSemanticEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import java.util.Iterator;
+
+import org.apache.commons.scxml.diagram.edit.parts.Assign2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Cancel2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.If2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Log2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.OnExitOnExitCompartmentEditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Param3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Raise2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Script3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Send2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Validate2EditPart;
+import org.apache.commons.scxml.diagram.part.ScxmlVisualIDRegistry;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class OnExitItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		CompoundCommand cc = getDestroyEdgesCommand();
+		addDestroyChildNodesCommand(cc);
+		addDestroyShortcutsCommand(cc);
+		cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+		return cc.unwrap();
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void addDestroyChildNodesCommand(CompoundCommand cmd) {
+		View view = (View) getHost().getModel();
+		EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+		if (annotation != null) {
+			return;
+		}
+		for (Iterator it = view.getChildren().iterator(); it.hasNext();) {
+			Node node = (Node) it.next();
+			switch (ScxmlVisualIDRegistry.getVisualID(node)) {
+			case OnExitOnExitCompartmentEditPart.VISUAL_ID:
+				for (Iterator cit = node.getChildren().iterator(); cit
+						.hasNext();) {
+					Node cnode = (Node) cit.next();
+					switch (ScxmlVisualIDRegistry.getVisualID(cnode)) {
+					case If2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case Assign2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case Raise2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case Log2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case Validate2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case Cancel2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case Param3EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case Send2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case Script3EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					}
+				}
+				break;
+			}
+		}
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitItemSemanticEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment2CanonicalEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment2CanonicalEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment2CanonicalEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment2CanonicalEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.diagram.edit.parts.Assign2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Cancel2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.If2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Log2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Param3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Raise2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Script3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Send2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Validate2EditPart;
+import org.apache.commons.scxml.diagram.part.ScxmlDiagramUpdater;
+import org.apache.commons.scxml.diagram.part.ScxmlNodeDescriptor;
+import org.apache.commons.scxml.diagram.part.ScxmlVisualIDRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class OnExitOnExitCompartment2CanonicalEditPolicy extends
+		CanonicalEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	Set myFeaturesToSynchronize;
+
+	/**
+	 * @generated
+	 */
+	protected List getSemanticChildrenList() {
+		View viewObject = (View) getHost().getModel();
+		List result = new LinkedList();
+		for (Iterator it = ScxmlDiagramUpdater
+				.getOnExitOnExitCompartment_5015SemanticChildren(viewObject)
+				.iterator(); it.hasNext();) {
+			result.add(((ScxmlNodeDescriptor) it.next()).getModelElement());
+		}
+		return result;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected boolean isOrphaned(Collection semanticChildren, final View view) {
+		int visualID = ScxmlVisualIDRegistry.getVisualID(view);
+		switch (visualID) {
+		case If2EditPart.VISUAL_ID:
+		case Assign2EditPart.VISUAL_ID:
+		case Raise2EditPart.VISUAL_ID:
+		case Log2EditPart.VISUAL_ID:
+		case Validate2EditPart.VISUAL_ID:
+		case Cancel2EditPart.VISUAL_ID:
+		case Param3EditPart.VISUAL_ID:
+		case Send2EditPart.VISUAL_ID:
+		case Script3EditPart.VISUAL_ID:
+			if (!semanticChildren.contains(view.getElement())) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected String getDefaultFactoryHint() {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Set getFeaturesToSynchronize() {
+		if (myFeaturesToSynchronize == null) {
+			myFeaturesToSynchronize = new HashSet();
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getOnExit_ExecutableContext());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getOnExit_Script());
+		}
+		return myFeaturesToSynchronize;
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment2CanonicalEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment2ItemSemanticEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment2ItemSemanticEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment2ItemSemanticEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment2ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.diagram.edit.commands.Assign2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Cancel2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.If2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Log2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Param3CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Raise2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Script3CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Send2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Validate2CreateCommand;
+import org.apache.commons.scxml.diagram.providers.ScxmlElementTypes;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+
+/**
+ * @generated
+ */
+public class OnExitOnExitCompartment2ItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getCreateCommand(CreateElementRequest req) {
+		if (ScxmlElementTypes.If_2017 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new If2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Assign_2018 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Assign2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Raise_2019 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Raise2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Log_2020 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Log2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Validate_2021 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Validate2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Cancel_2022 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Cancel2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Param_2023 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Param3CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Send_2024 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Send2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Script_2025 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_Script());
+			}
+			return getGEFWrapper(new Script3CreateCommand(req));
+		}
+		return super.getCreateCommand(req);
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment2ItemSemanticEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment3CanonicalEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment3CanonicalEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment3CanonicalEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment3CanonicalEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.diagram.edit.parts.Assign2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Cancel2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.If2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Log2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Param3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Raise2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Script3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Send2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Validate2EditPart;
+import org.apache.commons.scxml.diagram.part.ScxmlDiagramUpdater;
+import org.apache.commons.scxml.diagram.part.ScxmlNodeDescriptor;
+import org.apache.commons.scxml.diagram.part.ScxmlVisualIDRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class OnExitOnExitCompartment3CanonicalEditPolicy extends
+		CanonicalEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	Set myFeaturesToSynchronize;
+
+	/**
+	 * @generated
+	 */
+	protected List getSemanticChildrenList() {
+		View viewObject = (View) getHost().getModel();
+		List result = new LinkedList();
+		for (Iterator it = ScxmlDiagramUpdater
+				.getOnExitOnExitCompartment_5021SemanticChildren(viewObject)
+				.iterator(); it.hasNext();) {
+			result.add(((ScxmlNodeDescriptor) it.next()).getModelElement());
+		}
+		return result;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected boolean isOrphaned(Collection semanticChildren, final View view) {
+		int visualID = ScxmlVisualIDRegistry.getVisualID(view);
+		switch (visualID) {
+		case If2EditPart.VISUAL_ID:
+		case Assign2EditPart.VISUAL_ID:
+		case Raise2EditPart.VISUAL_ID:
+		case Log2EditPart.VISUAL_ID:
+		case Validate2EditPart.VISUAL_ID:
+		case Cancel2EditPart.VISUAL_ID:
+		case Param3EditPart.VISUAL_ID:
+		case Send2EditPart.VISUAL_ID:
+		case Script3EditPart.VISUAL_ID:
+			if (!semanticChildren.contains(view.getElement())) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected String getDefaultFactoryHint() {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Set getFeaturesToSynchronize() {
+		if (myFeaturesToSynchronize == null) {
+			myFeaturesToSynchronize = new HashSet();
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getOnExit_ExecutableContext());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getOnExit_Script());
+		}
+		return myFeaturesToSynchronize;
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment3CanonicalEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment3ItemSemanticEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment3ItemSemanticEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment3ItemSemanticEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment3ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.diagram.edit.commands.Assign2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Cancel2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.If2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Log2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Param3CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Raise2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Script3CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Send2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Validate2CreateCommand;
+import org.apache.commons.scxml.diagram.providers.ScxmlElementTypes;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+
+/**
+ * @generated
+ */
+public class OnExitOnExitCompartment3ItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getCreateCommand(CreateElementRequest req) {
+		if (ScxmlElementTypes.If_2017 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new If2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Assign_2018 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Assign2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Raise_2019 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Raise2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Log_2020 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Log2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Validate_2021 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Validate2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Cancel_2022 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Cancel2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Param_2023 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Param3CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Send_2024 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Send2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Script_2025 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_Script());
+			}
+			return getGEFWrapper(new Script3CreateCommand(req));
+		}
+		return super.getCreateCommand(req);
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartment3ItemSemanticEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartmentCanonicalEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartmentCanonicalEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartmentCanonicalEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartmentCanonicalEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.diagram.edit.parts.Assign2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Cancel2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.If2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Log2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Param3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Raise2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Script3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Send2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Validate2EditPart;
+import org.apache.commons.scxml.diagram.part.ScxmlDiagramUpdater;
+import org.apache.commons.scxml.diagram.part.ScxmlNodeDescriptor;
+import org.apache.commons.scxml.diagram.part.ScxmlVisualIDRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class OnExitOnExitCompartmentCanonicalEditPolicy extends
+		CanonicalEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	Set myFeaturesToSynchronize;
+
+	/**
+	 * @generated
+	 */
+	protected List getSemanticChildrenList() {
+		View viewObject = (View) getHost().getModel();
+		List result = new LinkedList();
+		for (Iterator it = ScxmlDiagramUpdater
+				.getOnExitOnExitCompartment_5007SemanticChildren(viewObject)
+				.iterator(); it.hasNext();) {
+			result.add(((ScxmlNodeDescriptor) it.next()).getModelElement());
+		}
+		return result;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected boolean isOrphaned(Collection semanticChildren, final View view) {
+		int visualID = ScxmlVisualIDRegistry.getVisualID(view);
+		switch (visualID) {
+		case If2EditPart.VISUAL_ID:
+		case Assign2EditPart.VISUAL_ID:
+		case Raise2EditPart.VISUAL_ID:
+		case Log2EditPart.VISUAL_ID:
+		case Validate2EditPart.VISUAL_ID:
+		case Cancel2EditPart.VISUAL_ID:
+		case Param3EditPart.VISUAL_ID:
+		case Send2EditPart.VISUAL_ID:
+		case Script3EditPart.VISUAL_ID:
+			if (!semanticChildren.contains(view.getElement())) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected String getDefaultFactoryHint() {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Set getFeaturesToSynchronize() {
+		if (myFeaturesToSynchronize == null) {
+			myFeaturesToSynchronize = new HashSet();
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getOnExit_ExecutableContext());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getOnExit_Script());
+		}
+		return myFeaturesToSynchronize;
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartmentCanonicalEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartmentItemSemanticEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartmentItemSemanticEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartmentItemSemanticEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartmentItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.diagram.edit.commands.Assign2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Cancel2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.If2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Log2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Param3CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Raise2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Script3CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Send2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Validate2CreateCommand;
+import org.apache.commons.scxml.diagram.providers.ScxmlElementTypes;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+
+/**
+ * @generated
+ */
+public class OnExitOnExitCompartmentItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getCreateCommand(CreateElementRequest req) {
+		if (ScxmlElementTypes.If_2017 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new If2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Assign_2018 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Assign2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Raise_2019 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Raise2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Log_2020 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Log2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Validate_2021 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Validate2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Cancel_2022 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Cancel2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Param_2023 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Param3CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Send_2024 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_ExecutableContext());
+			}
+			return getGEFWrapper(new Send2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Script_2025 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getOnExit_Script());
+			}
+			return getGEFWrapper(new Script3CreateCommand(req));
+		}
+		return super.getCreateCommand(req);
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/OnExitOnExitCompartmentItemSemanticEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Parallel2ItemSemanticEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Parallel2ItemSemanticEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Parallel2ItemSemanticEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Parallel2ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,151 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import java.util.Iterator;
+
+import org.apache.commons.scxml.diagram.edit.commands.TranslationCreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.TranslationReorientCommand;
+import org.apache.commons.scxml.diagram.edit.parts.AnchorEditPart;
+import org.apache.commons.scxml.diagram.edit.parts.HistoryState2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.OnEntry2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.OnExit2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Parallel3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.ParallelParallelCompartmentEditPart;
+import org.apache.commons.scxml.diagram.edit.parts.State2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.TranslationEditPart;
+import org.apache.commons.scxml.diagram.part.ScxmlVisualIDRegistry;
+import org.apache.commons.scxml.diagram.providers.ScxmlElementTypes;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class Parallel2ItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		CompoundCommand cc = getDestroyEdgesCommand();
+		addDestroyChildNodesCommand(cc);
+		addDestroyShortcutsCommand(cc);
+		cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+		return cc.unwrap();
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void addDestroyChildNodesCommand(CompoundCommand cmd) {
+		View view = (View) getHost().getModel();
+		EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+		if (annotation != null) {
+			return;
+		}
+		for (Iterator it = view.getChildren().iterator(); it.hasNext();) {
+			Node node = (Node) it.next();
+			switch (ScxmlVisualIDRegistry.getVisualID(node)) {
+			case ParallelParallelCompartmentEditPart.VISUAL_ID:
+				for (Iterator cit = node.getChildren().iterator(); cit
+						.hasNext();) {
+					Node cnode = (Node) cit.next();
+					switch (ScxmlVisualIDRegistry.getVisualID(cnode)) {
+					case HistoryState2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case AnchorEditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case Parallel3EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case OnEntry2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case OnExit2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case State2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					}
+				}
+				break;
+			}
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+		Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req)
+				: getCompleteCreateRelationshipCommand(req);
+		return command != null ? command : super
+				.getCreateRelationshipCommand(req);
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getStartCreateRelationshipCommand(
+			CreateRelationshipRequest req) {
+		if (ScxmlElementTypes.Translation_3001 == req.getElementType()) {
+			return getGEFWrapper(new TranslationCreateCommand(req, req
+					.getSource(), req.getTarget()));
+		}
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getCompleteCreateRelationshipCommand(
+			CreateRelationshipRequest req) {
+		if (ScxmlElementTypes.Translation_3001 == req.getElementType()) {
+			return getGEFWrapper(new TranslationCreateCommand(req, req
+					.getSource(), req.getTarget()));
+		}
+		return null;
+	}
+
+	/**
+	 * Returns command to reorient EClass based link. New link target or source
+	 * should be the domain model element associated with this node.
+	 * 
+	 * @generated
+	 */
+	protected Command getReorientRelationshipCommand(
+			ReorientRelationshipRequest req) {
+		switch (getVisualID(req)) {
+		case TranslationEditPart.VISUAL_ID:
+			return getGEFWrapper(new TranslationReorientCommand(req));
+		}
+		return super.getReorientRelationshipCommand(req);
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Parallel2ItemSemanticEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Parallel3ItemSemanticEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Parallel3ItemSemanticEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Parallel3ItemSemanticEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Parallel3ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,151 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import java.util.Iterator;
+
+import org.apache.commons.scxml.diagram.edit.commands.TranslationCreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.TranslationReorientCommand;
+import org.apache.commons.scxml.diagram.edit.parts.AnchorEditPart;
+import org.apache.commons.scxml.diagram.edit.parts.HistoryState2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.OnEntry2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.OnExit2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Parallel3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.ParallelParallelCompartment2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.State2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.TranslationEditPart;
+import org.apache.commons.scxml.diagram.part.ScxmlVisualIDRegistry;
+import org.apache.commons.scxml.diagram.providers.ScxmlElementTypes;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class Parallel3ItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		CompoundCommand cc = getDestroyEdgesCommand();
+		addDestroyChildNodesCommand(cc);
+		addDestroyShortcutsCommand(cc);
+		cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+		return cc.unwrap();
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void addDestroyChildNodesCommand(CompoundCommand cmd) {
+		View view = (View) getHost().getModel();
+		EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+		if (annotation != null) {
+			return;
+		}
+		for (Iterator it = view.getChildren().iterator(); it.hasNext();) {
+			Node node = (Node) it.next();
+			switch (ScxmlVisualIDRegistry.getVisualID(node)) {
+			case ParallelParallelCompartment2EditPart.VISUAL_ID:
+				for (Iterator cit = node.getChildren().iterator(); cit
+						.hasNext();) {
+					Node cnode = (Node) cit.next();
+					switch (ScxmlVisualIDRegistry.getVisualID(cnode)) {
+					case HistoryState2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case AnchorEditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case Parallel3EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case OnEntry2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case OnExit2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case State2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					}
+				}
+				break;
+			}
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+		Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req)
+				: getCompleteCreateRelationshipCommand(req);
+		return command != null ? command : super
+				.getCreateRelationshipCommand(req);
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getStartCreateRelationshipCommand(
+			CreateRelationshipRequest req) {
+		if (ScxmlElementTypes.Translation_3001 == req.getElementType()) {
+			return getGEFWrapper(new TranslationCreateCommand(req, req
+					.getSource(), req.getTarget()));
+		}
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getCompleteCreateRelationshipCommand(
+			CreateRelationshipRequest req) {
+		if (ScxmlElementTypes.Translation_3001 == req.getElementType()) {
+			return getGEFWrapper(new TranslationCreateCommand(req, req
+					.getSource(), req.getTarget()));
+		}
+		return null;
+	}
+
+	/**
+	 * Returns command to reorient EClass based link. New link target or source
+	 * should be the domain model element associated with this node.
+	 * 
+	 * @generated
+	 */
+	protected Command getReorientRelationshipCommand(
+			ReorientRelationshipRequest req) {
+		switch (getVisualID(req)) {
+		case TranslationEditPart.VISUAL_ID:
+			return getGEFWrapper(new TranslationReorientCommand(req));
+		}
+		return super.getReorientRelationshipCommand(req);
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Parallel3ItemSemanticEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelItemSemanticEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelItemSemanticEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelItemSemanticEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import java.util.Iterator;
+
+import org.apache.commons.scxml.diagram.edit.commands.TranslationCreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.TranslationReorientCommand;
+import org.apache.commons.scxml.diagram.edit.parts.AnchorEditPart;
+import org.apache.commons.scxml.diagram.edit.parts.HistoryState2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.OnEntry2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.OnExit2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Parallel3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.ParallelParallelCompartment3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.State2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.TranslationEditPart;
+import org.apache.commons.scxml.diagram.part.ScxmlVisualIDRegistry;
+import org.apache.commons.scxml.diagram.providers.ScxmlElementTypes;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class ParallelItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		CompoundCommand cc = getDestroyEdgesCommand();
+		addDestroyChildNodesCommand(cc);
+		addDestroyShortcutsCommand(cc);
+		View view = (View) getHost().getModel();
+		if (view.getEAnnotation("Shortcut") != null) { //$NON-NLS-1$
+			req.setElementToDestroy(view);
+		}
+		cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+		return cc.unwrap();
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void addDestroyChildNodesCommand(CompoundCommand cmd) {
+		View view = (View) getHost().getModel();
+		EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+		if (annotation != null) {
+			return;
+		}
+		for (Iterator it = view.getChildren().iterator(); it.hasNext();) {
+			Node node = (Node) it.next();
+			switch (ScxmlVisualIDRegistry.getVisualID(node)) {
+			case ParallelParallelCompartment3EditPart.VISUAL_ID:
+				for (Iterator cit = node.getChildren().iterator(); cit
+						.hasNext();) {
+					Node cnode = (Node) cit.next();
+					switch (ScxmlVisualIDRegistry.getVisualID(cnode)) {
+					case HistoryState2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case AnchorEditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case Parallel3EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case OnEntry2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case OnExit2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case State2EditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					}
+				}
+				break;
+			}
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+		Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req)
+				: getCompleteCreateRelationshipCommand(req);
+		return command != null ? command : super
+				.getCreateRelationshipCommand(req);
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getStartCreateRelationshipCommand(
+			CreateRelationshipRequest req) {
+		if (ScxmlElementTypes.Translation_3001 == req.getElementType()) {
+			return getGEFWrapper(new TranslationCreateCommand(req, req
+					.getSource(), req.getTarget()));
+		}
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getCompleteCreateRelationshipCommand(
+			CreateRelationshipRequest req) {
+		if (ScxmlElementTypes.Translation_3001 == req.getElementType()) {
+			return getGEFWrapper(new TranslationCreateCommand(req, req
+					.getSource(), req.getTarget()));
+		}
+		return null;
+	}
+
+	/**
+	 * Returns command to reorient EClass based link. New link target or source
+	 * should be the domain model element associated with this node.
+	 * 
+	 * @generated
+	 */
+	protected Command getReorientRelationshipCommand(
+			ReorientRelationshipRequest req) {
+		switch (getVisualID(req)) {
+		case TranslationEditPart.VISUAL_ID:
+			return getGEFWrapper(new TranslationReorientCommand(req));
+		}
+		return super.getReorientRelationshipCommand(req);
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelItemSemanticEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment2CanonicalEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment2CanonicalEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment2CanonicalEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment2CanonicalEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.diagram.edit.parts.AnchorEditPart;
+import org.apache.commons.scxml.diagram.edit.parts.HistoryState2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.OnEntry2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.OnExit2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Parallel3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.State2EditPart;
+import org.apache.commons.scxml.diagram.part.ScxmlDiagramUpdater;
+import org.apache.commons.scxml.diagram.part.ScxmlNodeDescriptor;
+import org.apache.commons.scxml.diagram.part.ScxmlVisualIDRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class ParallelParallelCompartment2CanonicalEditPolicy extends
+		CanonicalEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	Set myFeaturesToSynchronize;
+
+	/**
+	 * @generated
+	 */
+	protected List getSemanticChildrenList() {
+		View viewObject = (View) getHost().getModel();
+		List result = new LinkedList();
+		for (Iterator it = ScxmlDiagramUpdater
+				.getParallelParallelCompartment_5013SemanticChildren(viewObject)
+				.iterator(); it.hasNext();) {
+			result.add(((ScxmlNodeDescriptor) it.next()).getModelElement());
+		}
+		return result;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected boolean isOrphaned(Collection semanticChildren, final View view) {
+		int visualID = ScxmlVisualIDRegistry.getVisualID(view);
+		switch (visualID) {
+		case HistoryState2EditPart.VISUAL_ID:
+		case AnchorEditPart.VISUAL_ID:
+		case Parallel3EditPart.VISUAL_ID:
+		case OnEntry2EditPart.VISUAL_ID:
+		case OnExit2EditPart.VISUAL_ID:
+		case State2EditPart.VISUAL_ID:
+			if (!semanticChildren.contains(view.getElement())) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected String getDefaultFactoryHint() {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Set getFeaturesToSynchronize() {
+		if (myFeaturesToSynchronize == null) {
+			myFeaturesToSynchronize = new HashSet();
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_HistoryState());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_Anchor());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_Parallel());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_OnEntry());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_OnExit());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_State());
+		}
+		return myFeaturesToSynchronize;
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment2CanonicalEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment2ItemSemanticEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment2ItemSemanticEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment2ItemSemanticEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment2ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.diagram.edit.commands.AnchorCreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.HistoryState2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.OnEntry2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.OnExit2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Parallel3CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.State2CreateCommand;
+import org.apache.commons.scxml.diagram.providers.ScxmlElementTypes;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+
+/**
+ * @generated
+ */
+public class ParallelParallelCompartment2ItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getCreateCommand(CreateElementRequest req) {
+		if (ScxmlElementTypes.HistoryState_2033 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_HistoryState());
+			}
+			return getGEFWrapper(new HistoryState2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Anchor_2034 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_Anchor());
+			}
+			return getGEFWrapper(new AnchorCreateCommand(req));
+		}
+		if (ScxmlElementTypes.Parallel_2035 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_Parallel());
+			}
+			return getGEFWrapper(new Parallel3CreateCommand(req));
+		}
+		if (ScxmlElementTypes.OnEntry_2036 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_OnEntry());
+			}
+			return getGEFWrapper(new OnEntry2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.OnExit_2037 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_OnExit());
+			}
+			return getGEFWrapper(new OnExit2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.State_2038 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_State());
+			}
+			return getGEFWrapper(new State2CreateCommand(req));
+		}
+		return super.getCreateCommand(req);
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment2ItemSemanticEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment3CanonicalEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment3CanonicalEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment3CanonicalEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment3CanonicalEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.diagram.edit.parts.AnchorEditPart;
+import org.apache.commons.scxml.diagram.edit.parts.HistoryState2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.OnEntry2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.OnExit2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Parallel3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.State2EditPart;
+import org.apache.commons.scxml.diagram.part.ScxmlDiagramUpdater;
+import org.apache.commons.scxml.diagram.part.ScxmlNodeDescriptor;
+import org.apache.commons.scxml.diagram.part.ScxmlVisualIDRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class ParallelParallelCompartment3CanonicalEditPolicy extends
+		CanonicalEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	Set myFeaturesToSynchronize;
+
+	/**
+	 * @generated
+	 */
+	protected List getSemanticChildrenList() {
+		View viewObject = (View) getHost().getModel();
+		List result = new LinkedList();
+		for (Iterator it = ScxmlDiagramUpdater
+				.getParallelParallelCompartment_5023SemanticChildren(viewObject)
+				.iterator(); it.hasNext();) {
+			result.add(((ScxmlNodeDescriptor) it.next()).getModelElement());
+		}
+		return result;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected boolean isOrphaned(Collection semanticChildren, final View view) {
+		int visualID = ScxmlVisualIDRegistry.getVisualID(view);
+		switch (visualID) {
+		case HistoryState2EditPart.VISUAL_ID:
+		case AnchorEditPart.VISUAL_ID:
+		case Parallel3EditPart.VISUAL_ID:
+		case OnEntry2EditPart.VISUAL_ID:
+		case OnExit2EditPart.VISUAL_ID:
+		case State2EditPart.VISUAL_ID:
+			if (!semanticChildren.contains(view.getElement())) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected String getDefaultFactoryHint() {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Set getFeaturesToSynchronize() {
+		if (myFeaturesToSynchronize == null) {
+			myFeaturesToSynchronize = new HashSet();
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_HistoryState());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_Anchor());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_Parallel());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_OnEntry());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_OnExit());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_State());
+		}
+		return myFeaturesToSynchronize;
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment3CanonicalEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment3ItemSemanticEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment3ItemSemanticEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment3ItemSemanticEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment3ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.diagram.edit.commands.AnchorCreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.HistoryState2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.OnEntry2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.OnExit2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Parallel3CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.State2CreateCommand;
+import org.apache.commons.scxml.diagram.providers.ScxmlElementTypes;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+
+/**
+ * @generated
+ */
+public class ParallelParallelCompartment3ItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getCreateCommand(CreateElementRequest req) {
+		if (ScxmlElementTypes.HistoryState_2033 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_HistoryState());
+			}
+			return getGEFWrapper(new HistoryState2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Anchor_2034 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_Anchor());
+			}
+			return getGEFWrapper(new AnchorCreateCommand(req));
+		}
+		if (ScxmlElementTypes.Parallel_2035 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_Parallel());
+			}
+			return getGEFWrapper(new Parallel3CreateCommand(req));
+		}
+		if (ScxmlElementTypes.OnEntry_2036 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_OnEntry());
+			}
+			return getGEFWrapper(new OnEntry2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.OnExit_2037 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_OnExit());
+			}
+			return getGEFWrapper(new OnExit2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.State_2038 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_State());
+			}
+			return getGEFWrapper(new State2CreateCommand(req));
+		}
+		return super.getCreateCommand(req);
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartment3ItemSemanticEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartmentCanonicalEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartmentCanonicalEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartmentCanonicalEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartmentCanonicalEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.diagram.edit.parts.AnchorEditPart;
+import org.apache.commons.scxml.diagram.edit.parts.HistoryState2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.OnEntry2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.OnExit2EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.Parallel3EditPart;
+import org.apache.commons.scxml.diagram.edit.parts.State2EditPart;
+import org.apache.commons.scxml.diagram.part.ScxmlDiagramUpdater;
+import org.apache.commons.scxml.diagram.part.ScxmlNodeDescriptor;
+import org.apache.commons.scxml.diagram.part.ScxmlVisualIDRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class ParallelParallelCompartmentCanonicalEditPolicy extends
+		CanonicalEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	Set myFeaturesToSynchronize;
+
+	/**
+	 * @generated
+	 */
+	protected List getSemanticChildrenList() {
+		View viewObject = (View) getHost().getModel();
+		List result = new LinkedList();
+		for (Iterator it = ScxmlDiagramUpdater
+				.getParallelParallelCompartment_5012SemanticChildren(viewObject)
+				.iterator(); it.hasNext();) {
+			result.add(((ScxmlNodeDescriptor) it.next()).getModelElement());
+		}
+		return result;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected boolean isOrphaned(Collection semanticChildren, final View view) {
+		int visualID = ScxmlVisualIDRegistry.getVisualID(view);
+		switch (visualID) {
+		case HistoryState2EditPart.VISUAL_ID:
+		case AnchorEditPart.VISUAL_ID:
+		case Parallel3EditPart.VISUAL_ID:
+		case OnEntry2EditPart.VISUAL_ID:
+		case OnExit2EditPart.VISUAL_ID:
+		case State2EditPart.VISUAL_ID:
+			if (!semanticChildren.contains(view.getElement())) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected String getDefaultFactoryHint() {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Set getFeaturesToSynchronize() {
+		if (myFeaturesToSynchronize == null) {
+			myFeaturesToSynchronize = new HashSet();
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_HistoryState());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_Anchor());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_Parallel());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_OnEntry());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_OnExit());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getParallel_State());
+		}
+		return myFeaturesToSynchronize;
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartmentCanonicalEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartmentItemSemanticEditPolicy.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartmentItemSemanticEditPolicy.java?rev=945185&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartmentItemSemanticEditPolicy.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartmentItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.scxml.diagram.edit.policies;
+
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.diagram.edit.commands.AnchorCreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.HistoryState2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.OnEntry2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.OnExit2CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.Parallel3CreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.State2CreateCommand;
+import org.apache.commons.scxml.diagram.providers.ScxmlElementTypes;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+
+/**
+ * @generated
+ */
+public class ParallelParallelCompartmentItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getCreateCommand(CreateElementRequest req) {
+		if (ScxmlElementTypes.HistoryState_2033 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_HistoryState());
+			}
+			return getGEFWrapper(new HistoryState2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.Anchor_2034 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_Anchor());
+			}
+			return getGEFWrapper(new AnchorCreateCommand(req));
+		}
+		if (ScxmlElementTypes.Parallel_2035 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_Parallel());
+			}
+			return getGEFWrapper(new Parallel3CreateCommand(req));
+		}
+		if (ScxmlElementTypes.OnEntry_2036 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_OnEntry());
+			}
+			return getGEFWrapper(new OnEntry2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.OnExit_2037 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_OnExit());
+			}
+			return getGEFWrapper(new OnExit2CreateCommand(req));
+		}
+		if (ScxmlElementTypes.State_2038 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getParallel_State());
+			}
+			return getGEFWrapper(new State2CreateCommand(req));
+		}
+		return super.getCreateCommand(req);
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParallelParallelCompartmentItemSemanticEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message