commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gu...@apache.org
Subject svn commit: r945185 [27/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/Param2ItemSemanticEditPolicy.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/Param2ItemSemanticEditPolicy.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/Param2ItemSemanticEditPolicy.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/Param2ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,40 @@
+/*
+ * 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.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;
+
+/**
+ * @generated
+ */
+public class Param2ItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		CompoundCommand cc = getDestroyEdgesCommand();
+		addDestroyShortcutsCommand(cc);
+		cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+		return cc.unwrap();
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Param2ItemSemanticEditPolicy.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/Param3ItemSemanticEditPolicy.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/Param3ItemSemanticEditPolicy.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/Param3ItemSemanticEditPolicy.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/Param3ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,40 @@
+/*
+ * 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.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;
+
+/**
+ * @generated
+ */
+public class Param3ItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		CompoundCommand cc = getDestroyEdgesCommand();
+		addDestroyShortcutsCommand(cc);
+		cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+		return cc.unwrap();
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Param3ItemSemanticEditPolicy.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/Param4ItemSemanticEditPolicy.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/Param4ItemSemanticEditPolicy.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/Param4ItemSemanticEditPolicy.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/Param4ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,40 @@
+/*
+ * 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.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;
+
+/**
+ * @generated
+ */
+public class Param4ItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		CompoundCommand cc = getDestroyEdgesCommand();
+		addDestroyShortcutsCommand(cc);
+		cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+		return cc.unwrap();
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Param4ItemSemanticEditPolicy.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/Param5ItemSemanticEditPolicy.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/Param5ItemSemanticEditPolicy.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/Param5ItemSemanticEditPolicy.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/Param5ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,40 @@
+/*
+ * 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.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;
+
+/**
+ * @generated
+ */
+public class Param5ItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		CompoundCommand cc = getDestroyEdgesCommand();
+		addDestroyShortcutsCommand(cc);
+		cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+		return cc.unwrap();
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Param5ItemSemanticEditPolicy.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/ParamItemSemanticEditPolicy.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/ParamItemSemanticEditPolicy.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/ParamItemSemanticEditPolicy.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/ParamItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,40 @@
+/*
+ * 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.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;
+
+/**
+ * @generated
+ */
+public class ParamItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		CompoundCommand cc = getDestroyEdgesCommand();
+		addDestroyShortcutsCommand(cc);
+		cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+		return cc.unwrap();
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ParamItemSemanticEditPolicy.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/Raise2ItemSemanticEditPolicy.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/Raise2ItemSemanticEditPolicy.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/Raise2ItemSemanticEditPolicy.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/Raise2ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,40 @@
+/*
+ * 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.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;
+
+/**
+ * @generated
+ */
+public class Raise2ItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		CompoundCommand cc = getDestroyEdgesCommand();
+		addDestroyShortcutsCommand(cc);
+		cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+		return cc.unwrap();
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Raise2ItemSemanticEditPolicy.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/RaiseItemSemanticEditPolicy.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/RaiseItemSemanticEditPolicy.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/RaiseItemSemanticEditPolicy.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/RaiseItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,40 @@
+/*
+ * 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.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;
+
+/**
+ * @generated
+ */
+public class RaiseItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		CompoundCommand cc = getDestroyEdgesCommand();
+		addDestroyShortcutsCommand(cc);
+		cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+		return cc.unwrap();
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/RaiseItemSemanticEditPolicy.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/Script2ItemSemanticEditPolicy.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/Script2ItemSemanticEditPolicy.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/Script2ItemSemanticEditPolicy.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/Script2ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,40 @@
+/*
+ * 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.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;
+
+/**
+ * @generated
+ */
+public class Script2ItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		CompoundCommand cc = getDestroyEdgesCommand();
+		addDestroyShortcutsCommand(cc);
+		cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+		return cc.unwrap();
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Script2ItemSemanticEditPolicy.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/Script3ItemSemanticEditPolicy.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/Script3ItemSemanticEditPolicy.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/Script3ItemSemanticEditPolicy.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/Script3ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,40 @@
+/*
+ * 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.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;
+
+/**
+ * @generated
+ */
+public class Script3ItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		CompoundCommand cc = getDestroyEdgesCommand();
+		addDestroyShortcutsCommand(cc);
+		cc.add(getGEFWrapper(new DestroyElementCommand(req)));
+		return cc.unwrap();
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/Script3ItemSemanticEditPolicy.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/ScriptItemSemanticEditPolicy.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/ScriptItemSemanticEditPolicy.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/ScriptItemSemanticEditPolicy.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/ScriptItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,45 @@
+/*
+ * 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.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.View;
+
+/**
+ * @generated
+ */
+public class ScriptItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		CompoundCommand cc = getDestroyEdgesCommand();
+		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();
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ScriptItemSemanticEditPolicy.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/ScxmlBaseItemSemanticEditPolicy.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/ScxmlBaseItemSemanticEditPolicy.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/ScxmlBaseItemSemanticEditPolicy.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/ScxmlBaseItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,379 @@
+/*
+ * 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.Collections;
+import java.util.Iterator;
+
+import org.apache.commons.scxml.NamedElement;
+import org.apache.commons.scxml.diagram.edit.helpers.ScxmlBaseEditHelper;
+import org.apache.commons.scxml.diagram.part.ScxmlVisualIDRegistry;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.CompoundCommand;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand;
+import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IEditHelperContext;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+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.DestroyReferenceRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class ScxmlBaseItemSemanticEditPolicy extends SemanticEditPolicy {
+
+	/**
+	 * Extended request data key to hold editpart visual id.
+	 * 
+	 * @generated
+	 */
+	public static final String VISUAL_ID_KEY = "visual_id"; //$NON-NLS-1$
+
+	/**
+	 * Extended request data key to hold editpart visual id.
+	 * Add visual id of edited editpart to extended data of the request
+	 * so command switch can decide what kind of diagram element is being edited.
+	 * It is done in those cases when it's not possible to deduce diagram
+	 * element kind from domain element.
+	 * 
+	 * @generated
+	 */
+	public Command getCommand(Request request) {
+		if (request instanceof ReconnectRequest) {
+			Object view = ((ReconnectRequest) request).getConnectionEditPart()
+					.getModel();
+			if (view instanceof View) {
+				Integer id = new Integer(ScxmlVisualIDRegistry
+						.getVisualID((View) view));
+				request.getExtendedData().put(VISUAL_ID_KEY, id);
+			}
+		}
+		return super.getCommand(request);
+	}
+
+	/**
+	 * Returns visual id from request parameters.
+	 * 
+	 * @generated
+	 */
+	protected int getVisualID(IEditCommandRequest request) {
+		Object id = request.getParameter(VISUAL_ID_KEY);
+		return id instanceof Integer ? ((Integer) id).intValue() : -1;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getSemanticCommand(IEditCommandRequest request) {
+		IEditCommandRequest completedRequest = completeRequest(request);
+		Object editHelperContext = completedRequest.getEditHelperContext();
+		if (editHelperContext instanceof View
+				|| (editHelperContext instanceof IEditHelperContext && ((IEditHelperContext) editHelperContext)
+						.getEObject() instanceof View)) {
+			// no semantic commands are provided for pure design elements
+			return null;
+		}
+		if (editHelperContext == null) {
+			editHelperContext = ViewUtil
+					.resolveSemanticElement((View) getHost().getModel());
+		}
+		IElementType elementType = ElementTypeRegistry.getInstance()
+				.getElementType(editHelperContext);
+		if (elementType == ElementTypeRegistry.getInstance().getType(
+				"org.eclipse.gmf.runtime.emf.type.core.default")) { //$NON-NLS-1$ 
+			elementType = null;
+		}
+		Command semanticCommand = getSemanticCommandSwitch(completedRequest);
+		if (semanticCommand != null) {
+			ICommand command = semanticCommand instanceof ICommandProxy ? ((ICommandProxy) semanticCommand)
+					.getICommand()
+					: new CommandProxy(semanticCommand);
+			completedRequest.setParameter(
+					ScxmlBaseEditHelper.EDIT_POLICY_COMMAND, command);
+		}
+		if (elementType != null) {
+			ICommand command = elementType.getEditCommand(completedRequest);
+			if (command != null) {
+				if (!(command instanceof CompositeTransactionalCommand)) {
+					TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
+							.getEditingDomain();
+					command = new CompositeTransactionalCommand(editingDomain,
+							command.getLabel()).compose(command);
+				}
+				semanticCommand = new ICommandProxy(command);
+			}
+		}
+		boolean shouldProceed = true;
+		if (completedRequest instanceof DestroyRequest) {
+			shouldProceed = shouldProceed((DestroyRequest) completedRequest);
+		}
+		if (shouldProceed) {
+			if (completedRequest instanceof DestroyRequest) {
+				TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost())
+						.getEditingDomain();
+				Command deleteViewCommand = new ICommandProxy(
+						new DeleteCommand(editingDomain, (View) getHost()
+								.getModel()));
+				semanticCommand = semanticCommand == null ? deleteViewCommand
+						: semanticCommand.chain(deleteViewCommand);
+			}
+			return semanticCommand;
+		}
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getSemanticCommandSwitch(IEditCommandRequest req) {
+		if (req instanceof CreateRelationshipRequest) {
+			return getCreateRelationshipCommand((CreateRelationshipRequest) req);
+		} else if (req instanceof CreateElementRequest) {
+			return getCreateCommand((CreateElementRequest) req);
+		} else if (req instanceof ConfigureRequest) {
+			return getConfigureCommand((ConfigureRequest) req);
+		} else if (req instanceof DestroyElementRequest) {
+			return getDestroyElementCommand((DestroyElementRequest) req);
+		} else if (req instanceof DestroyReferenceRequest) {
+			return getDestroyReferenceCommand((DestroyReferenceRequest) req);
+		} else if (req instanceof DuplicateElementsRequest) {
+			return getDuplicateCommand((DuplicateElementsRequest) req);
+		} else if (req instanceof GetEditContextRequest) {
+			return getEditContextCommand((GetEditContextRequest) req);
+		} else if (req instanceof MoveRequest) {
+			return getMoveCommand((MoveRequest) req);
+		} else if (req instanceof ReorientReferenceRelationshipRequest) {
+			return getReorientReferenceRelationshipCommand((ReorientReferenceRelationshipRequest) req);
+		} else if (req instanceof ReorientRelationshipRequest) {
+			return getReorientRelationshipCommand((ReorientRelationshipRequest) req);
+		} else if (req instanceof SetRequest) {
+			return getSetCommand((SetRequest) req);
+		}
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getConfigureCommand(ConfigureRequest req) {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getCreateCommand(CreateElementRequest req) {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getSetCommand(SetRequest req) {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getEditContextCommand(GetEditContextRequest req) {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(DestroyElementRequest req) {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getDuplicateCommand(DuplicateElementsRequest req) {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getMoveCommand(MoveRequest req) {
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getReorientReferenceRelationshipCommand(
+			ReorientReferenceRelationshipRequest req) {
+		return UnexecutableCommand.INSTANCE;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Command getReorientRelationshipCommand(
+			ReorientRelationshipRequest req) {
+		return UnexecutableCommand.INSTANCE;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected final Command getGEFWrapper(ICommand cmd) {
+		return new ICommandProxy(cmd);
+	}
+
+	/**
+	 * @deprecated use getGEFWrapper() instead
+	 * @generated
+	 */
+	protected final Command getMSLWrapper(ICommand cmd) {
+		// XXX deprecated: use getGEFWrapper() instead
+		return getGEFWrapper(cmd);
+	}
+
+	/**
+	 * @generated
+	 */
+	protected EObject getSemanticElement() {
+		return ViewUtil.resolveSemanticElement((View) getHost().getModel());
+	}
+
+	/**
+	 * Returns editing domain from the host edit part.
+	 * 
+	 * @generated
+	 */
+	protected TransactionalEditingDomain getEditingDomain() {
+		return ((IGraphicalEditPart) getHost()).getEditingDomain();
+	}
+
+	/**
+	 * Creates command to destroy the link.
+	 * 
+	 * @generated
+	 */
+	protected Command getDestroyElementCommand(View view) {
+		EditPart editPart = (EditPart) getHost().getViewer()
+				.getEditPartRegistry().get(view);
+		DestroyElementRequest request = new DestroyElementRequest(
+				getEditingDomain(), false);
+		return editPart.getCommand(new EditCommandRequestWrapper(request,
+				Collections.EMPTY_MAP));
+	}
+
+	/**
+	 * Creates commands to destroy all host incoming and outgoing links.
+	 * 
+	 * @generated
+	 */
+	protected CompoundCommand getDestroyEdgesCommand() {
+		CompoundCommand cmd = new CompoundCommand();
+		View view = (View) getHost().getModel();
+		for (Iterator it = view.getSourceEdges().iterator(); it.hasNext();) {
+			cmd.add(getDestroyElementCommand((Edge) it.next()));
+		}
+		for (Iterator it = view.getTargetEdges().iterator(); it.hasNext();) {
+			cmd.add(getDestroyElementCommand((Edge) it.next()));
+		}
+		return cmd;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void addDestroyShortcutsCommand(CompoundCommand command) {
+		View view = (View) getHost().getModel();
+		if (view.getEAnnotation("Shortcut") != null) { //$NON-NLS-1$
+			return;
+		}
+		for (Iterator it = view.getDiagram().getChildren().iterator(); it
+				.hasNext();) {
+			View nextView = (View) it.next();
+			if (nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() || nextView.getElement() != view.getElement()) { //$NON-NLS-1$
+				continue;
+			}
+			command.add(getDestroyElementCommand(nextView));
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	public static class LinkConstraints {
+
+		/**
+		 * @generated
+		 */
+		public static boolean canCreateTranslation_3001(NamedElement source,
+				NamedElement target) {
+			return canExistTranslation_3001(source, target);
+		}
+
+		/**
+		 * @generated
+		 */
+		public static boolean canExistTranslation_3001(NamedElement source,
+				NamedElement target) {
+
+			return true;
+		}
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ScxmlBaseItemSemanticEditPolicy.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/ScxmlTextNonResizableEditPolicy.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/ScxmlTextNonResizableEditPolicy.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/ScxmlTextNonResizableEditPolicy.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/ScxmlTextNonResizableEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,219 @@
+/*
+ * 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.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.handles.MoveHandle;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableEditPolicyEx;
+import org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+
+/**
+ * @generated
+ */
+public class ScxmlTextNonResizableEditPolicy extends NonResizableEditPolicyEx {
+
+	/**
+	 * @generated
+	 */
+	private IFigure selectionFeedbackFigure;
+
+	/**
+	 * @generated
+	 */
+	private IFigure focusFeedbackFigure;
+
+	/**
+	 * @generated
+	 */
+	protected void showPrimarySelection() {
+		if (getHostFigure() instanceof WrappingLabel) {
+			((WrappingLabel) getHostFigure()).setSelected(true);
+			((WrappingLabel) getHostFigure()).setFocus(true);
+		} else {
+			showSelection();
+			showFocus();
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void showSelection() {
+		if (getHostFigure() instanceof WrappingLabel) {
+			((WrappingLabel) getHostFigure()).setSelected(true);
+			((WrappingLabel) getHostFigure()).setFocus(false);
+		} else {
+			hideSelection();
+			addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
+			refreshSelectionFeedback();
+			hideFocus();
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void hideSelection() {
+		if (getHostFigure() instanceof WrappingLabel) {
+			((WrappingLabel) getHostFigure()).setSelected(false);
+			((WrappingLabel) getHostFigure()).setFocus(false);
+		} else {
+			if (selectionFeedbackFigure != null) {
+				removeFeedback(selectionFeedbackFigure);
+				selectionFeedbackFigure = null;
+			}
+			hideFocus();
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void showFocus() {
+		if (getHostFigure() instanceof WrappingLabel) {
+			((WrappingLabel) getHostFigure()).setFocus(true);
+		} else {
+			hideFocus();
+			addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
+			refreshFocusFeedback();
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void hideFocus() {
+		if (getHostFigure() instanceof WrappingLabel) {
+			((WrappingLabel) getHostFigure()).setFocus(false);
+		} else {
+			if (focusFeedbackFigure != null) {
+				removeFeedback(focusFeedbackFigure);
+				focusFeedbackFigure = null;
+			}
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Rectangle getFeedbackBounds() {
+		Rectangle bounds;
+		if (getHostFigure() instanceof Label) {
+			bounds = ((Label) getHostFigure()).getTextBounds();
+			bounds.intersect(getHostFigure().getBounds());
+		} else {
+			bounds = getHostFigure().getBounds().getCopy();
+		}
+		getHostFigure().getParent().translateToAbsolute(bounds);
+		getFeedbackLayer().translateToRelative(bounds);
+		return bounds;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected IFigure createSelectionFeedbackFigure() {
+		if (getHostFigure() instanceof Label) {
+			Label feedbackFigure = new Label();
+			feedbackFigure.setOpaque(true);
+			feedbackFigure
+					.setBackgroundColor(ColorConstants.menuBackgroundSelected);
+			feedbackFigure
+					.setForegroundColor(ColorConstants.menuForegroundSelected);
+			return feedbackFigure;
+		} else {
+			RectangleFigure feedbackFigure = new RectangleFigure();
+			feedbackFigure.setFill(false);
+			return feedbackFigure;
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected IFigure createFocusFeedbackFigure() {
+		return new Figure() {
+
+			protected void paintFigure(Graphics graphics) {
+				graphics.drawFocus(getBounds().getResized(-1, -1));
+			}
+		};
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void updateLabel(Label target) {
+		Label source = (Label) getHostFigure();
+		target.setText(source.getText());
+		target.setTextAlignment(source.getTextAlignment());
+		target.setFont(source.getFont());
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void refreshSelectionFeedback() {
+		if (selectionFeedbackFigure != null) {
+			if (selectionFeedbackFigure instanceof Label) {
+				updateLabel((Label) selectionFeedbackFigure);
+				selectionFeedbackFigure.setBounds(getFeedbackBounds());
+			} else {
+				selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5,
+						5));
+			}
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void refreshFocusFeedback() {
+		if (focusFeedbackFigure != null) {
+			focusFeedbackFigure.setBounds(getFeedbackBounds());
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	public void refreshFeedback() {
+		refreshSelectionFeedback();
+		refreshFocusFeedback();
+	}
+
+	/**
+	 * @generated
+	 */
+	protected List createSelectionHandles() {
+		MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost());
+		moveHandle.setBorder(null);
+		moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
+		return Collections.singletonList(moveHandle);
+	}
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ScxmlTextNonResizableEditPolicy.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/ScxmlTextSelectionEditPolicy.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/ScxmlTextSelectionEditPolicy.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/ScxmlTextSelectionEditPolicy.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/ScxmlTextSelectionEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,203 @@
+/*
+ * 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.eclipse.draw2d.ColorConstants;
+import org.eclipse.draw2d.Figure;
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.gef.editpolicies.SelectionEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+
+/**
+ * @generated
+ */
+public class ScxmlTextSelectionEditPolicy extends SelectionEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	private IFigure selectionFeedbackFigure;
+
+	/**
+	 * @generated
+	 */
+	private IFigure focusFeedbackFigure;
+
+	/**
+	 * @generated
+	 */
+	protected void showPrimarySelection() {
+		if (getHostFigure() instanceof WrappingLabel) {
+			((WrappingLabel) getHostFigure()).setSelected(true);
+			((WrappingLabel) getHostFigure()).setFocus(true);
+		} else {
+			showSelection();
+			showFocus();
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void showSelection() {
+		if (getHostFigure() instanceof WrappingLabel) {
+			((WrappingLabel) getHostFigure()).setSelected(true);
+			((WrappingLabel) getHostFigure()).setFocus(false);
+		} else {
+			hideSelection();
+			addFeedback(selectionFeedbackFigure = createSelectionFeedbackFigure());
+			refreshSelectionFeedback();
+			hideFocus();
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void hideSelection() {
+		if (getHostFigure() instanceof WrappingLabel) {
+			((WrappingLabel) getHostFigure()).setSelected(false);
+			((WrappingLabel) getHostFigure()).setFocus(false);
+		} else {
+			if (selectionFeedbackFigure != null) {
+				removeFeedback(selectionFeedbackFigure);
+				selectionFeedbackFigure = null;
+			}
+			hideFocus();
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void showFocus() {
+		if (getHostFigure() instanceof WrappingLabel) {
+			((WrappingLabel) getHostFigure()).setFocus(true);
+		} else {
+			hideFocus();
+			addFeedback(focusFeedbackFigure = createFocusFeedbackFigure());
+			refreshFocusFeedback();
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void hideFocus() {
+		if (getHostFigure() instanceof WrappingLabel) {
+			((WrappingLabel) getHostFigure()).setFocus(false);
+		} else {
+			if (focusFeedbackFigure != null) {
+				removeFeedback(focusFeedbackFigure);
+				focusFeedbackFigure = null;
+			}
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected Rectangle getFeedbackBounds() {
+		Rectangle bounds;
+		if (getHostFigure() instanceof Label) {
+			bounds = ((Label) getHostFigure()).getTextBounds();
+			bounds.intersect(getHostFigure().getBounds());
+		} else {
+			bounds = getHostFigure().getBounds().getCopy();
+		}
+		getHostFigure().getParent().translateToAbsolute(bounds);
+		getFeedbackLayer().translateToRelative(bounds);
+		return bounds;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected IFigure createSelectionFeedbackFigure() {
+		if (getHostFigure() instanceof Label) {
+			Label feedbackFigure = new Label();
+			feedbackFigure.setOpaque(true);
+			feedbackFigure
+					.setBackgroundColor(ColorConstants.menuBackgroundSelected);
+			feedbackFigure
+					.setForegroundColor(ColorConstants.menuForegroundSelected);
+			return feedbackFigure;
+		} else {
+			RectangleFigure feedbackFigure = new RectangleFigure();
+			feedbackFigure.setFill(false);
+			return feedbackFigure;
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected IFigure createFocusFeedbackFigure() {
+		return new Figure() {
+
+			protected void paintFigure(Graphics graphics) {
+				graphics.drawFocus(getBounds().getResized(-1, -1));
+			}
+		};
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void updateLabel(Label target) {
+		Label source = (Label) getHostFigure();
+		target.setText(source.getText());
+		target.setTextAlignment(source.getTextAlignment());
+		target.setFont(source.getFont());
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void refreshSelectionFeedback() {
+		if (selectionFeedbackFigure != null) {
+			if (selectionFeedbackFigure instanceof Label) {
+				updateLabel((Label) selectionFeedbackFigure);
+				selectionFeedbackFigure.setBounds(getFeedbackBounds());
+			} else {
+				selectionFeedbackFigure.setBounds(getFeedbackBounds().expand(5,
+						5));
+			}
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void refreshFocusFeedback() {
+		if (focusFeedbackFigure != null) {
+			focusFeedbackFigure.setBounds(getFeedbackBounds());
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	public void refreshFeedback() {
+		refreshSelectionFeedback();
+		refreshFocusFeedback();
+	}
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/diagram/edit/policies/ScxmlTextSelectionEditPolicy.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/Send2ItemSemanticEditPolicy.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/Send2ItemSemanticEditPolicy.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/Send2ItemSemanticEditPolicy.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/Send2ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,80 @@
+/*
+ * 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.ContentEditPart;
+import org.apache.commons.scxml.diagram.edit.parts.ParamEditPart;
+import org.apache.commons.scxml.diagram.edit.parts.SendSendCompartment2EditPart;
+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 Send2ItemSemanticEditPolicy 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 SendSendCompartment2EditPart.VISUAL_ID:
+				for (Iterator cit = node.getChildren().iterator(); cit
+						.hasNext();) {
+					Node cnode = (Node) cit.next();
+					switch (ScxmlVisualIDRegistry.getVisualID(cnode)) {
+					case ParamEditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case ContentEditPart.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/Send2ItemSemanticEditPolicy.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/SendItemSemanticEditPolicy.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/SendItemSemanticEditPolicy.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/SendItemSemanticEditPolicy.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/SendItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,79 @@
+/*
+ * 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.ContentEditPart;
+import org.apache.commons.scxml.diagram.edit.parts.ParamEditPart;
+import org.apache.commons.scxml.diagram.edit.parts.SendSendCompartmentEditPart;
+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 SendItemSemanticEditPolicy 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 SendSendCompartmentEditPart.VISUAL_ID:
+				for (Iterator cit = node.getChildren().iterator(); cit
+						.hasNext();) {
+					Node cnode = (Node) cit.next();
+					switch (ScxmlVisualIDRegistry.getVisualID(cnode)) {
+					case ParamEditPart.VISUAL_ID:
+						cmd.add(getDestroyElementCommand(cnode));
+						break;
+					case ContentEditPart.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/SendItemSemanticEditPolicy.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/SendSendCompartment2CanonicalEditPolicy.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/SendSendCompartment2CanonicalEditPolicy.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/SendSendCompartment2CanonicalEditPolicy.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/SendSendCompartment2CanonicalEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,95 @@
+/*
+ * 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.ContentEditPart;
+import org.apache.commons.scxml.diagram.edit.parts.ParamEditPart;
+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 SendSendCompartment2CanonicalEditPolicy extends
+		CanonicalEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	Set myFeaturesToSynchronize;
+
+	/**
+	 * @generated
+	 */
+	protected List getSemanticChildrenList() {
+		View viewObject = (View) getHost().getModel();
+		List result = new LinkedList();
+		for (Iterator it = ScxmlDiagramUpdater
+				.getSendSendCompartment_5009SemanticChildren(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 ParamEditPart.VISUAL_ID:
+		case ContentEditPart.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.getSend_Param());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getSend_Content());
+		}
+		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/SendSendCompartment2CanonicalEditPolicy.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/SendSendCompartment2ItemSemanticEditPolicy.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/SendSendCompartment2ItemSemanticEditPolicy.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/SendSendCompartment2ItemSemanticEditPolicy.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/SendSendCompartment2ItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,53 @@
+/*
+ * 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.ContentCreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.ParamCreateCommand;
+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 SendSendCompartment2ItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getCreateCommand(CreateElementRequest req) {
+		if (ScxmlElementTypes.Param_2011 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getSend_Param());
+			}
+			return getGEFWrapper(new ParamCreateCommand(req));
+		}
+		if (ScxmlElementTypes.Content_2012 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getSend_Content());
+			}
+			return getGEFWrapper(new ContentCreateCommand(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/SendSendCompartment2ItemSemanticEditPolicy.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/SendSendCompartmentCanonicalEditPolicy.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/SendSendCompartmentCanonicalEditPolicy.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/SendSendCompartmentCanonicalEditPolicy.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/SendSendCompartmentCanonicalEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,94 @@
+/*
+ * 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.ContentEditPart;
+import org.apache.commons.scxml.diagram.edit.parts.ParamEditPart;
+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 SendSendCompartmentCanonicalEditPolicy extends CanonicalEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	Set myFeaturesToSynchronize;
+
+	/**
+	 * @generated
+	 */
+	protected List getSemanticChildrenList() {
+		View viewObject = (View) getHost().getModel();
+		List result = new LinkedList();
+		for (Iterator it = ScxmlDiagramUpdater
+				.getSendSendCompartment_5004SemanticChildren(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 ParamEditPart.VISUAL_ID:
+		case ContentEditPart.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.getSend_Param());
+			myFeaturesToSynchronize.add(ScxmlPackage.eINSTANCE
+					.getSend_Content());
+		}
+		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/SendSendCompartmentCanonicalEditPolicy.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/SendSendCompartmentItemSemanticEditPolicy.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/SendSendCompartmentItemSemanticEditPolicy.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/SendSendCompartmentItemSemanticEditPolicy.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/SendSendCompartmentItemSemanticEditPolicy.java Mon May 17 14:38:45 2010
@@ -0,0 +1,53 @@
+/*
+ * 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.ContentCreateCommand;
+import org.apache.commons.scxml.diagram.edit.commands.ParamCreateCommand;
+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 SendSendCompartmentItemSemanticEditPolicy extends
+		ScxmlBaseItemSemanticEditPolicy {
+
+	/**
+	 * @generated
+	 */
+	protected Command getCreateCommand(CreateElementRequest req) {
+		if (ScxmlElementTypes.Param_2011 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getSend_Param());
+			}
+			return getGEFWrapper(new ParamCreateCommand(req));
+		}
+		if (ScxmlElementTypes.Content_2012 == req.getElementType()) {
+			if (req.getContainmentFeature() == null) {
+				req.setContainmentFeature(ScxmlPackage.eINSTANCE
+						.getSend_Content());
+			}
+			return getGEFWrapper(new ContentCreateCommand(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/SendSendCompartmentItemSemanticEditPolicy.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message