commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gu...@apache.org
Subject svn commit: r953071 [5/5] - /commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/
Date Wed, 09 Jun 2010 16:12:48 GMT
Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingPaletteFactory.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingPaletteFactory.java?rev=953071&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingPaletteFactory.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingPaletteFactory.java Wed Jun  9 16:12:48 2010
@@ -0,0 +1,594 @@
+/*
+ * 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.modeling.diagram.part;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.scxml.modeling.diagram.providers.ModelingElementTypes;
+import org.eclipse.gef.Tool;
+import org.eclipse.gef.palette.PaletteContainer;
+import org.eclipse.gef.palette.PaletteDrawer;
+import org.eclipse.gef.palette.PaletteGroup;
+import org.eclipse.gef.palette.PaletteRoot;
+import org.eclipse.gef.palette.ToolEntry;
+import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeConnectionTool;
+import org.eclipse.gmf.runtime.diagram.ui.tools.UnspecifiedTypeCreationTool;
+
+/**
+ * @generated
+ */
+public class ModelingPaletteFactory {
+
+	/**
+	 * @generated
+	 */
+	public void fillPalette(PaletteRoot paletteRoot) {
+		paletteRoot.add(createScxmlStateElement1Group());
+		paletteRoot.add(createExecuteContent2Group());
+		paletteRoot.add(createDataModelElement3Group());
+	}
+
+	/**
+	 * Creates "Scxml State Element" palette tool group
+	 * @generated
+	 */
+	private PaletteContainer createScxmlStateElement1Group() {
+		PaletteDrawer paletteContainer = new PaletteDrawer(
+				Messages.ScxmlStateElement1Group_title);
+		paletteContainer.add(createInitialState5CreationTool());
+		paletteContainer.add(createState1CreationTool());
+		paletteContainer.add(createParallel7CreationTool());
+		paletteContainer.add(createFinalState6CreationTool());
+		paletteContainer.add(createHistoryState8CreationTool());
+		paletteContainer.add(createTransition2CreationTool());
+		paletteContainer.add(createOnEntry3CreationTool());
+		paletteContainer.add(createOnExit4CreationTool());
+		paletteContainer.add(createAnchor10CreationTool());
+		paletteContainer.add(createDonedata11CreationTool());
+		paletteContainer.add(createInvoke12CreationTool());
+		paletteContainer.add(createFinalize13CreationTool());
+		return paletteContainer;
+	}
+
+	/**
+	 * Creates "Execute Content" palette tool group
+	 * @generated
+	 */
+	private PaletteContainer createExecuteContent2Group() {
+		PaletteDrawer paletteContainer = new PaletteDrawer(
+				Messages.ExecuteContent2Group_title);
+		paletteContainer.add(createAssign1CreationTool());
+		paletteContainer.add(createRaise2CreationTool());
+		paletteContainer.add(createIf3CreationTool());
+		paletteContainer.add(createElseIf4CreationTool());
+		paletteContainer.add(createElse5CreationTool());
+		paletteContainer.add(createLog6CreationTool());
+		paletteContainer.add(createValidate7CreationTool());
+		paletteContainer.add(createParam8CreationTool());
+		paletteContainer.add(createSend9CreationTool());
+		paletteContainer.add(createCancel10CreationTool());
+		paletteContainer.add(createExtenExecContent9CreationTool());
+		return paletteContainer;
+	}
+
+	/**
+	 * Creates "Data Model Element" palette tool group
+	 * @generated
+	 */
+	private PaletteContainer createDataModelElement3Group() {
+		PaletteDrawer paletteContainer = new PaletteDrawer(
+				Messages.DataModelElement3Group_title);
+		paletteContainer.add(createDataModel1CreationTool());
+		paletteContainer.add(createData2CreationTool());
+		paletteContainer.add(createScript3CreationTool());
+		paletteContainer.add(createContent4CreationTool());
+		return paletteContainer;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createState1CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(3);
+		types.add(ModelingElementTypes.State_2001);
+		types.add(ModelingElementTypes.State_3038);
+		types.add(ModelingElementTypes.State_3046);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.State1CreationTool_title,
+				Messages.State1CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.State_2001));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createTransition2CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
+		types.add(ModelingElementTypes.Transition_4001);
+		LinkToolEntry entry = new LinkToolEntry(
+				Messages.Transition2CreationTool_title,
+				Messages.Transition2CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Transition_4001));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createOnEntry3CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(3);
+		types.add(ModelingElementTypes.OnEntry_3001);
+		types.add(ModelingElementTypes.OnEntry_3036);
+		types.add(ModelingElementTypes.OnEntry_3044);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.OnEntry3CreationTool_title,
+				Messages.OnEntry3CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.OnEntry_3001));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createOnExit4CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(3);
+		types.add(ModelingElementTypes.OnExit_3016);
+		types.add(ModelingElementTypes.OnExit_3037);
+		types.add(ModelingElementTypes.OnExit_3045);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.OnExit4CreationTool_title,
+				Messages.OnExit4CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.OnExit_3016));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createInitialState5CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2);
+		types.add(ModelingElementTypes.InitialState_3030);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.InitialState5CreationTool_title,
+				Messages.InitialState5CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.InitialState_3030));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createFinalState6CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2);
+		types.add(ModelingElementTypes.FinalState_3040);
+		types.add(ModelingElementTypes.FinalState_2006);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.FinalState6CreationTool_title,
+				Messages.FinalState6CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.FinalState_3040));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createParallel7CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(3);
+		types.add(ModelingElementTypes.Parallel_3032);
+		types.add(ModelingElementTypes.Parallel_3035);
+		types.add(ModelingElementTypes.Parallel_2004);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Parallel7CreationTool_title,
+				Messages.Parallel7CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Parallel_3032));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createHistoryState8CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2);
+		types.add(ModelingElementTypes.HistoryState_3031);
+		types.add(ModelingElementTypes.HistoryState_3033);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.HistoryState8CreationTool_title,
+				Messages.HistoryState8CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.HistoryState_3031));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createExtenExecContent9CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2);
+		types.add(ModelingElementTypes.ExtenExecContent_3049);
+		types.add(ModelingElementTypes.ExtenExecContent_3050);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.ExtenExecContent9CreationTool_title,
+				Messages.ExtenExecContent9CreationTool_desc, types);
+		entry
+				.setSmallIcon(ModelingElementTypes
+						.getImageDescriptor(ModelingElementTypes.ExtenExecContent_3049));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createAnchor10CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2);
+		types.add(ModelingElementTypes.Anchor_3034);
+		types.add(ModelingElementTypes.Anchor_3039);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Anchor10CreationTool_title,
+				Messages.Anchor10CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Anchor_3034));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createDonedata11CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
+		types.add(ModelingElementTypes.Donedata_3041);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Donedata11CreationTool_title,
+				Messages.Donedata11CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Donedata_3041));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createInvoke12CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
+		types.add(ModelingElementTypes.Invoke_3026);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Invoke12CreationTool_title,
+				Messages.Invoke12CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Invoke_3026));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createFinalize13CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
+		types.add(ModelingElementTypes.Finalize_3027);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Finalize13CreationTool_title,
+				Messages.Finalize13CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Finalize_3027));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createAssign1CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2);
+		types.add(ModelingElementTypes.Assign_3005);
+		types.add(ModelingElementTypes.Assign_3018);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Assign1CreationTool_title,
+				Messages.Assign1CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Assign_3005));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createRaise2CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2);
+		types.add(ModelingElementTypes.Raise_3006);
+		types.add(ModelingElementTypes.Raise_3019);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Raise2CreationTool_title,
+				Messages.Raise2CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Raise_3006));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createIf3CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2);
+		types.add(ModelingElementTypes.If_3002);
+		types.add(ModelingElementTypes.If_3017);
+		NodeToolEntry entry = new NodeToolEntry(Messages.If3CreationTool_title,
+				Messages.If3CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.If_3002));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createElseIf4CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
+		types.add(ModelingElementTypes.ElseIf_3003);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.ElseIf4CreationTool_title,
+				Messages.ElseIf4CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.ElseIf_3003));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createElse5CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
+		types.add(ModelingElementTypes.Else_3004);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Else5CreationTool_title,
+				Messages.Else5CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Else_3004));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createLog6CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2);
+		types.add(ModelingElementTypes.Log_3007);
+		types.add(ModelingElementTypes.Log_3020);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Log6CreationTool_title,
+				Messages.Log6CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Log_3007));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createValidate7CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2);
+		types.add(ModelingElementTypes.Validate_3008);
+		types.add(ModelingElementTypes.Validate_3021);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Validate7CreationTool_title,
+				Messages.Validate7CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Validate_3008));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createParam8CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(5);
+		types.add(ModelingElementTypes.Param_3011);
+		types.add(ModelingElementTypes.Param_3014);
+		types.add(ModelingElementTypes.Param_3023);
+		types.add(ModelingElementTypes.Param_3028);
+		types.add(ModelingElementTypes.Param_3042);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Param8CreationTool_title,
+				Messages.Param8CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Param_3011));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createSend9CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2);
+		types.add(ModelingElementTypes.Send_3010);
+		types.add(ModelingElementTypes.Send_3024);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Send9CreationTool_title,
+				Messages.Send9CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Send_3010));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createCancel10CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(2);
+		types.add(ModelingElementTypes.Cancel_3009);
+		types.add(ModelingElementTypes.Cancel_3022);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Cancel10CreationTool_title,
+				Messages.Cancel10CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Cancel_3009));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createDataModel1CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
+		types.add(ModelingElementTypes.DataModel_2005);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.DataModel1CreationTool_title,
+				Messages.DataModel1CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.DataModel_2005));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createData2CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(1);
+		types.add(ModelingElementTypes.Data_3047);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Data2CreationTool_title,
+				Messages.Data2CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Data_3047));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createScript3CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(3);
+		types.add(ModelingElementTypes.Script_3015);
+		types.add(ModelingElementTypes.Script_3025);
+		types.add(ModelingElementTypes.Script_2003);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Script3CreationTool_title,
+				Messages.Script3CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Script_3015));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private ToolEntry createContent4CreationTool() {
+		List/*<IElementType>*/types = new ArrayList/*<IElementType>*/(5);
+		types.add(ModelingElementTypes.Content_3012);
+		types.add(ModelingElementTypes.Content_3013);
+		types.add(ModelingElementTypes.Content_3029);
+		types.add(ModelingElementTypes.Content_3043);
+		types.add(ModelingElementTypes.Content_3048);
+		NodeToolEntry entry = new NodeToolEntry(
+				Messages.Content4CreationTool_title,
+				Messages.Content4CreationTool_desc, types);
+		entry.setSmallIcon(ModelingElementTypes
+				.getImageDescriptor(ModelingElementTypes.Content_3012));
+		entry.setLargeIcon(entry.getSmallIcon());
+		return entry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private static class NodeToolEntry extends ToolEntry {
+
+		/**
+		 * @generated
+		 */
+		private final List elementTypes;
+
+		/**
+		 * @generated
+		 */
+		private NodeToolEntry(String title, String description,
+				List elementTypes) {
+			super(title, description, null, null);
+			this.elementTypes = elementTypes;
+		}
+
+		/**
+		 * @generated
+		 */
+		public Tool createTool() {
+			Tool tool = new UnspecifiedTypeCreationTool(elementTypes);
+			tool.setProperties(getToolProperties());
+			return tool;
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	private static class LinkToolEntry extends ToolEntry {
+
+		/**
+		 * @generated
+		 */
+		private final List relationshipTypes;
+
+		/**
+		 * @generated
+		 */
+		private LinkToolEntry(String title, String description,
+				List relationshipTypes) {
+			super(title, description, null, null);
+			this.relationshipTypes = relationshipTypes;
+		}
+
+		/**
+		 * @generated
+		 */
+		public Tool createTool() {
+			Tool tool = new UnspecifiedTypeConnectionTool(relationshipTypes);
+			tool.setProperties(getToolProperties());
+			return tool;
+		}
+	}
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingPaletteFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingUriEditorInputTester.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingUriEditorInputTester.java?rev=953071&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingUriEditorInputTester.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingUriEditorInputTester.java Wed Jun  9 16:12:48 2010
@@ -0,0 +1,39 @@
+/*
+ * 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.modeling.diagram.part;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.emf.common.ui.URIEditorInput;
+
+/**
+ * @generated
+ */
+public class ModelingUriEditorInputTester extends PropertyTester {
+
+	/**
+	 * @generated
+	 */
+	public boolean test(Object receiver, String method, Object[] args,
+			Object expectedValue) {
+		if (false == receiver instanceof URIEditorInput) {
+			return false;
+		}
+		URIEditorInput editorInput = (URIEditorInput) receiver;
+		return "modeling_diagram".equals(editorInput.getURI().fileExtension()); //$NON-NLS-1$
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingUriEditorInputTester.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingVisualIDRegistry.java
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingVisualIDRegistry.java?rev=953071&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingVisualIDRegistry.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingVisualIDRegistry.java Wed Jun  9 16:12:48 2010
@@ -0,0 +1,1598 @@
+/*
+ * 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.modeling.diagram.part;
+
+import org.apache.commons.scxml.modeling.ModelingPackage;
+import org.apache.commons.scxml.modeling.ServiceTemplate;
+import org.apache.commons.scxml.modeling.diagram.edit.parts.*;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * This registry is used to determine which type of visual object should be
+ * created for the corresponding Diagram, Node, ChildNode or Link represented
+ * by a domain model object.
+ * 
+ * @generated
+ */
+public class ModelingVisualIDRegistry {
+
+	/**
+	 * @generated
+	 */
+	private static final String DEBUG_KEY = "org.apache.commons.scxml.modeling.diagram/debug/visualID"; //$NON-NLS-1$
+
+	/**
+	 * @generated
+	 */
+	public static int getVisualID(View view) {
+		if (view instanceof Diagram) {
+			if (ServiceTemplateEditPart.MODEL_ID.equals(view.getType())) {
+				return ServiceTemplateEditPart.VISUAL_ID;
+			} else {
+				return -1;
+			}
+		}
+		return org.apache.commons.scxml.modeling.diagram.part.ModelingVisualIDRegistry
+				.getVisualID(view.getType());
+	}
+
+	/**
+	 * @generated
+	 */
+	public static String getModelID(View view) {
+		View diagram = view.getDiagram();
+		while (view != diagram) {
+			EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
+			if (annotation != null) {
+				return (String) annotation.getDetails().get("modelID"); //$NON-NLS-1$
+			}
+			view = (View) view.eContainer();
+		}
+		return diagram != null ? diagram.getType() : null;
+	}
+
+	/**
+	 * @generated
+	 */
+	public static int getVisualID(String type) {
+		try {
+			return Integer.parseInt(type);
+		} catch (NumberFormatException e) {
+			if (Boolean.TRUE.toString().equalsIgnoreCase(
+					Platform.getDebugOption(DEBUG_KEY))) {
+				ModelingDiagramEditorPlugin.getInstance().logError(
+						"Unable to parse view type as a visualID number: "
+								+ type);
+			}
+		}
+		return -1;
+	}
+
+	/**
+	 * @generated
+	 */
+	public static String getType(int visualID) {
+		return String.valueOf(visualID);
+	}
+
+	/**
+	 * @generated
+	 */
+	public static int getDiagramVisualID(EObject domainElement) {
+		if (domainElement == null) {
+			return -1;
+		}
+		if (ModelingPackage.eINSTANCE.getServiceTemplate().isSuperTypeOf(
+				domainElement.eClass())
+				&& isDiagram((ServiceTemplate) domainElement)) {
+			return ServiceTemplateEditPart.VISUAL_ID;
+		}
+		return -1;
+	}
+
+	/**
+	 * @generated
+	 */
+	public static int getNodeVisualID(View containerView, EObject domainElement) {
+		if (domainElement == null) {
+			return -1;
+		}
+		String containerModelID = org.apache.commons.scxml.modeling.diagram.part.ModelingVisualIDRegistry
+				.getModelID(containerView);
+		if (!ServiceTemplateEditPart.MODEL_ID.equals(containerModelID)) {
+			return -1;
+		}
+		int containerVisualID;
+		if (ServiceTemplateEditPart.MODEL_ID.equals(containerModelID)) {
+			containerVisualID = org.apache.commons.scxml.modeling.diagram.part.ModelingVisualIDRegistry
+					.getVisualID(containerView);
+		} else {
+			if (containerView instanceof Diagram) {
+				containerVisualID = ServiceTemplateEditPart.VISUAL_ID;
+			} else {
+				return -1;
+			}
+		}
+		switch (containerVisualID) {
+		case StateStateCompartmentEditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getOnEntry().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnEntryEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getOnExit().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnExitEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getInvoke().isSuperTypeOf(
+					domainElement.eClass())) {
+				return InvokeEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getInitialState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return InitialState2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getHistoryState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return HistoryStateEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getParallel().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Parallel2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getAnchor().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Anchor2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getFinalState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return FinalState2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return State3EditPart.VISUAL_ID;
+			}
+			break;
+		case OnEntryOnEntryCompartmentEditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getIf().isSuperTypeOf(
+					domainElement.eClass())) {
+				return IfEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getAssign().isSuperTypeOf(
+					domainElement.eClass())) {
+				return AssignEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getRaise().isSuperTypeOf(
+					domainElement.eClass())) {
+				return RaiseEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getLog().isSuperTypeOf(
+					domainElement.eClass())) {
+				return LogEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getValidate().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ValidateEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getCancel().isSuperTypeOf(
+					domainElement.eClass())) {
+				return CancelEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getSend().isSuperTypeOf(
+					domainElement.eClass())) {
+				return SendEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getParam().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Param2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getScript().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Script2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getExtenExecContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ExtenExecContentEditPart.VISUAL_ID;
+			}
+			break;
+		case IfIfCompartmentEditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getElseIf().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ElseIfEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getElse().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ElseEditPart.VISUAL_ID;
+			}
+			break;
+		case SendSendCompartmentEditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getParam().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ParamEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ContentEditPart.VISUAL_ID;
+			}
+			break;
+		case ContentContentCompartmentEditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Content2EditPart.VISUAL_ID;
+			}
+			break;
+		case ContentContentCompartment2EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Content2EditPart.VISUAL_ID;
+			}
+			break;
+		case OnExitOnExitCompartmentEditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getIf().isSuperTypeOf(
+					domainElement.eClass())) {
+				return If2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getAssign().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Assign2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getRaise().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Raise2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getLog().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Log2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getValidate().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Validate2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getCancel().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Cancel2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getParam().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Param3EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getSend().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Send2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getScript().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Script3EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getExtenExecContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ExtenExecContent2EditPart.VISUAL_ID;
+			}
+			break;
+		case IfIfCompartment2EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getElseIf().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ElseIfEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getElse().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ElseEditPart.VISUAL_ID;
+			}
+			break;
+		case SendSendCompartment2EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getParam().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ParamEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ContentEditPart.VISUAL_ID;
+			}
+			break;
+		case InvokeInvokeCompartmentEditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getFinalize().isSuperTypeOf(
+					domainElement.eClass())) {
+				return FinalizeEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getParam().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Param4EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Content3EditPart.VISUAL_ID;
+			}
+			break;
+		case ContentContentCompartment3EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Content2EditPart.VISUAL_ID;
+			}
+			break;
+		case ParallelParallelCompartmentEditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getHistoryState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return HistoryState2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getAnchor().isSuperTypeOf(
+					domainElement.eClass())) {
+				return AnchorEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getParallel().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Parallel3EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getOnEntry().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnEntry2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getOnExit().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnExit2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return State2EditPart.VISUAL_ID;
+			}
+			break;
+		case ParallelParallelCompartment2EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getHistoryState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return HistoryState2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getAnchor().isSuperTypeOf(
+					domainElement.eClass())) {
+				return AnchorEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getParallel().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Parallel3EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getOnEntry().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnEntry2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getOnExit().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnExit2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return State2EditPart.VISUAL_ID;
+			}
+			break;
+		case OnEntryOnEntryCompartment2EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getIf().isSuperTypeOf(
+					domainElement.eClass())) {
+				return IfEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getAssign().isSuperTypeOf(
+					domainElement.eClass())) {
+				return AssignEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getRaise().isSuperTypeOf(
+					domainElement.eClass())) {
+				return RaiseEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getLog().isSuperTypeOf(
+					domainElement.eClass())) {
+				return LogEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getValidate().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ValidateEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getCancel().isSuperTypeOf(
+					domainElement.eClass())) {
+				return CancelEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getSend().isSuperTypeOf(
+					domainElement.eClass())) {
+				return SendEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getParam().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Param2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getScript().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Script2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getExtenExecContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ExtenExecContentEditPart.VISUAL_ID;
+			}
+			break;
+		case OnExitOnExitCompartment2EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getIf().isSuperTypeOf(
+					domainElement.eClass())) {
+				return If2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getAssign().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Assign2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getRaise().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Raise2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getLog().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Log2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getValidate().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Validate2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getCancel().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Cancel2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getParam().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Param3EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getSend().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Send2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getScript().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Script3EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getExtenExecContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ExtenExecContent2EditPart.VISUAL_ID;
+			}
+			break;
+		case StateStateCompartment2EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getOnEntry().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnEntryEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getOnExit().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnExitEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getInvoke().isSuperTypeOf(
+					domainElement.eClass())) {
+				return InvokeEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getInitialState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return InitialState2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getHistoryState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return HistoryStateEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getParallel().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Parallel2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getAnchor().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Anchor2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getFinalState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return FinalState2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return State3EditPart.VISUAL_ID;
+			}
+			break;
+		case FinalStateFinalStateCompartmentEditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getDonedata().isSuperTypeOf(
+					domainElement.eClass())) {
+				return DonedataEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getOnEntry().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnEntry3EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getOnExit().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnExit3EditPart.VISUAL_ID;
+			}
+			break;
+		case DonedataDonedataCompartmentEditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getParam().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Param5EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Content4EditPart.VISUAL_ID;
+			}
+			break;
+		case ContentContentCompartment4EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Content2EditPart.VISUAL_ID;
+			}
+			break;
+		case OnEntryOnEntryCompartment3EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getIf().isSuperTypeOf(
+					domainElement.eClass())) {
+				return IfEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getAssign().isSuperTypeOf(
+					domainElement.eClass())) {
+				return AssignEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getRaise().isSuperTypeOf(
+					domainElement.eClass())) {
+				return RaiseEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getLog().isSuperTypeOf(
+					domainElement.eClass())) {
+				return LogEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getValidate().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ValidateEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getCancel().isSuperTypeOf(
+					domainElement.eClass())) {
+				return CancelEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getSend().isSuperTypeOf(
+					domainElement.eClass())) {
+				return SendEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getParam().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Param2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getScript().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Script2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getExtenExecContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ExtenExecContentEditPart.VISUAL_ID;
+			}
+			break;
+		case OnExitOnExitCompartment3EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getIf().isSuperTypeOf(
+					domainElement.eClass())) {
+				return If2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getAssign().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Assign2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getRaise().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Raise2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getLog().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Log2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getValidate().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Validate2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getCancel().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Cancel2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getParam().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Param3EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getSend().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Send2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getScript().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Script3EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getExtenExecContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ExtenExecContent2EditPart.VISUAL_ID;
+			}
+			break;
+		case StateStateCompartment3EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getOnEntry().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnEntryEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getOnExit().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnExitEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getInvoke().isSuperTypeOf(
+					domainElement.eClass())) {
+				return InvokeEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getInitialState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return InitialState2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getHistoryState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return HistoryStateEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getParallel().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Parallel2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getAnchor().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Anchor2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getFinalState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return FinalState2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return State3EditPart.VISUAL_ID;
+			}
+			break;
+		case ParallelParallelCompartment3EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getHistoryState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return HistoryState2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getAnchor().isSuperTypeOf(
+					domainElement.eClass())) {
+				return AnchorEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getParallel().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Parallel3EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getOnEntry().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnEntry2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getOnExit().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnExit2EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return State2EditPart.VISUAL_ID;
+			}
+			break;
+		case DataModelDataModelCompartmentEditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getData().isSuperTypeOf(
+					domainElement.eClass())) {
+				return DataEditPart.VISUAL_ID;
+			}
+			break;
+		case DataDataCompartmentEditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Content5EditPart.VISUAL_ID;
+			}
+			break;
+		case ContentContentCompartment5EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getContent().isSuperTypeOf(
+					domainElement.eClass())) {
+				return Content2EditPart.VISUAL_ID;
+			}
+			break;
+		case FinalStateFinalStateCompartment2EditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getDonedata().isSuperTypeOf(
+					domainElement.eClass())) {
+				return DonedataEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getOnEntry().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnEntry3EditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getOnExit().isSuperTypeOf(
+					domainElement.eClass())) {
+				return OnExit3EditPart.VISUAL_ID;
+			}
+			break;
+		case ServiceTemplateEditPart.VISUAL_ID:
+			if (ModelingPackage.eINSTANCE.getState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return StateEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getScript().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ScriptEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getParallel().isSuperTypeOf(
+					domainElement.eClass())) {
+				return ParallelEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getDataModel().isSuperTypeOf(
+					domainElement.eClass())) {
+				return DataModelEditPart.VISUAL_ID;
+			}
+			if (ModelingPackage.eINSTANCE.getFinalState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return FinalStateEditPart.VISUAL_ID;
+			}
+			break;
+		}
+		return -1;
+	}
+
+	/**
+	 * @generated
+	 */
+	public static boolean canCreateNode(View containerView, int nodeVisualID) {
+		String containerModelID = org.apache.commons.scxml.modeling.diagram.part.ModelingVisualIDRegistry
+				.getModelID(containerView);
+		if (!ServiceTemplateEditPart.MODEL_ID.equals(containerModelID)) {
+			return false;
+		}
+		int containerVisualID;
+		if (ServiceTemplateEditPart.MODEL_ID.equals(containerModelID)) {
+			containerVisualID = org.apache.commons.scxml.modeling.diagram.part.ModelingVisualIDRegistry
+					.getVisualID(containerView);
+		} else {
+			if (containerView instanceof Diagram) {
+				containerVisualID = ServiceTemplateEditPart.VISUAL_ID;
+			} else {
+				return false;
+			}
+		}
+		switch (containerVisualID) {
+		case StateEditPart.VISUAL_ID:
+			if (StateIdEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (StateStateCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ScriptEditPart.VISUAL_ID:
+			if (WrappingLabel2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ParallelEditPart.VISUAL_ID:
+			if (ParallelIdEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ParallelParallelCompartment3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case DataModelEditPart.VISUAL_ID:
+			if (DataModelSchemaEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (DataModelDataModelCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case FinalStateEditPart.VISUAL_ID:
+			if (FinalStateIdEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (FinalStateFinalStateCompartment2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case OnEntryEditPart.VISUAL_ID:
+			if (WrappingLabel3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnEntryOnEntryCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case IfEditPart.VISUAL_ID:
+			if (IfCondEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (IfIfCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ElseIfEditPart.VISUAL_ID:
+			if (ElseIfCondEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ElseEditPart.VISUAL_ID:
+			if (WrappingLabel4EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case AssignEditPart.VISUAL_ID:
+			if (AssignDataidEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case RaiseEditPart.VISUAL_ID:
+			if (RaiseEventEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case LogEditPart.VISUAL_ID:
+			if (LogExprEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ValidateEditPart.VISUAL_ID:
+			if (ValidateSchemaEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case CancelEditPart.VISUAL_ID:
+			if (CancelSendidEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case SendEditPart.VISUAL_ID:
+			if (SendEventEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (SendSendCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ParamEditPart.VISUAL_ID:
+			if (ParamNameEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ContentEditPart.VISUAL_ID:
+			if (ContentContentCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Content2EditPart.VISUAL_ID:
+			if (ContentContentCompartment2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Param2EditPart.VISUAL_ID:
+			if (ParamName2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Script2EditPart.VISUAL_ID:
+			if (WrappingLabel5EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ExtenExecContentEditPart.VISUAL_ID:
+			if (WrappingLabel15EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case OnExitEditPart.VISUAL_ID:
+			if (WrappingLabel6EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnExitOnExitCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case If2EditPart.VISUAL_ID:
+			if (IfCond2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (IfIfCompartment2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Assign2EditPart.VISUAL_ID:
+			if (AssignDataid2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Raise2EditPart.VISUAL_ID:
+			if (RaiseEvent2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Log2EditPart.VISUAL_ID:
+			if (LogExpr2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Validate2EditPart.VISUAL_ID:
+			if (ValidateSchema2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Cancel2EditPart.VISUAL_ID:
+			if (CancelSendid2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Param3EditPart.VISUAL_ID:
+			if (ParamName3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Send2EditPart.VISUAL_ID:
+			if (SendEvent2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (SendSendCompartment2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Script3EditPart.VISUAL_ID:
+			if (WrappingLabel7EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ExtenExecContent2EditPart.VISUAL_ID:
+			if (WrappingLabel16EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case InvokeEditPart.VISUAL_ID:
+			if (InvokeTypeEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (InvokeInvokeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case FinalizeEditPart.VISUAL_ID:
+			if (WrappingLabel8EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Param4EditPart.VISUAL_ID:
+			if (ParamName4EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Content3EditPart.VISUAL_ID:
+			if (ContentContentCompartment3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case InitialState2EditPart.VISUAL_ID:
+			if (WrappingLabel9EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case HistoryStateEditPart.VISUAL_ID:
+			if (HistoryStateIdEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Parallel2EditPart.VISUAL_ID:
+			if (ParallelId2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ParallelParallelCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case HistoryState2EditPart.VISUAL_ID:
+			if (HistoryStateId2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case AnchorEditPart.VISUAL_ID:
+			if (AnchorTypeEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Parallel3EditPart.VISUAL_ID:
+			if (ParallelId3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ParallelParallelCompartment2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case OnEntry2EditPart.VISUAL_ID:
+			if (WrappingLabel10EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnEntryOnEntryCompartment2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case OnExit2EditPart.VISUAL_ID:
+			if (WrappingLabel11EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnExitOnExitCompartment2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case State2EditPart.VISUAL_ID:
+			if (StateId2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (StateStateCompartment2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Anchor2EditPart.VISUAL_ID:
+			if (AnchorType2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case FinalState2EditPart.VISUAL_ID:
+			if (FinalStateId2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (FinalStateFinalStateCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case DonedataEditPart.VISUAL_ID:
+			if (WrappingLabel12EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (DonedataDonedataCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Param5EditPart.VISUAL_ID:
+			if (ParamName5EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Content4EditPart.VISUAL_ID:
+			if (ContentContentCompartment4EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case OnEntry3EditPart.VISUAL_ID:
+			if (WrappingLabel13EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnEntryOnEntryCompartment3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case OnExit3EditPart.VISUAL_ID:
+			if (WrappingLabel14EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnExitOnExitCompartment3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case State3EditPart.VISUAL_ID:
+			if (StateId3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (StateStateCompartment3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case DataEditPart.VISUAL_ID:
+			if (DataIdEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (DataDataCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case Content5EditPart.VISUAL_ID:
+			if (ContentContentCompartment5EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case StateStateCompartmentEditPart.VISUAL_ID:
+			if (OnEntryEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnExitEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (InvokeEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (InitialState2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (HistoryStateEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Parallel2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Anchor2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (FinalState2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (State3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case OnEntryOnEntryCompartmentEditPart.VISUAL_ID:
+			if (IfEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (AssignEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (RaiseEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (LogEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ValidateEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (CancelEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (SendEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Param2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Script2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ExtenExecContentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case IfIfCompartmentEditPart.VISUAL_ID:
+			if (ElseIfEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ElseEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case SendSendCompartmentEditPart.VISUAL_ID:
+			if (ParamEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ContentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ContentContentCompartmentEditPart.VISUAL_ID:
+			if (Content2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ContentContentCompartment2EditPart.VISUAL_ID:
+			if (Content2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case OnExitOnExitCompartmentEditPart.VISUAL_ID:
+			if (If2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Assign2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Raise2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Log2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Validate2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Cancel2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Param3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Send2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Script3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ExtenExecContent2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case IfIfCompartment2EditPart.VISUAL_ID:
+			if (ElseIfEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ElseEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case SendSendCompartment2EditPart.VISUAL_ID:
+			if (ParamEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ContentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case InvokeInvokeCompartmentEditPart.VISUAL_ID:
+			if (FinalizeEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Param4EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Content3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ContentContentCompartment3EditPart.VISUAL_ID:
+			if (Content2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ParallelParallelCompartmentEditPart.VISUAL_ID:
+			if (HistoryState2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (AnchorEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Parallel3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnEntry2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnExit2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (State2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ParallelParallelCompartment2EditPart.VISUAL_ID:
+			if (HistoryState2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (AnchorEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Parallel3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnEntry2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnExit2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (State2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case OnEntryOnEntryCompartment2EditPart.VISUAL_ID:
+			if (IfEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (AssignEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (RaiseEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (LogEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ValidateEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (CancelEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (SendEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Param2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Script2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ExtenExecContentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case OnExitOnExitCompartment2EditPart.VISUAL_ID:
+			if (If2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Assign2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Raise2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Log2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Validate2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Cancel2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Param3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Send2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Script3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ExtenExecContent2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case StateStateCompartment2EditPart.VISUAL_ID:
+			if (OnEntryEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnExitEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (InvokeEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (InitialState2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (HistoryStateEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Parallel2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Anchor2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (FinalState2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (State3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case FinalStateFinalStateCompartmentEditPart.VISUAL_ID:
+			if (DonedataEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnEntry3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnExit3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case DonedataDonedataCompartmentEditPart.VISUAL_ID:
+			if (Param5EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Content4EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ContentContentCompartment4EditPart.VISUAL_ID:
+			if (Content2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case OnEntryOnEntryCompartment3EditPart.VISUAL_ID:
+			if (IfEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (AssignEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (RaiseEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (LogEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ValidateEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (CancelEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (SendEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Param2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Script2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ExtenExecContentEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case OnExitOnExitCompartment3EditPart.VISUAL_ID:
+			if (If2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Assign2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Raise2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Log2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Validate2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Cancel2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Param3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Send2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Script3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ExtenExecContent2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case StateStateCompartment3EditPart.VISUAL_ID:
+			if (OnEntryEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnExitEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (InvokeEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (InitialState2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (HistoryStateEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Parallel2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Anchor2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (FinalState2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (State3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ParallelParallelCompartment3EditPart.VISUAL_ID:
+			if (HistoryState2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (AnchorEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (Parallel3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnEntry2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnExit2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (State2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case DataModelDataModelCompartmentEditPart.VISUAL_ID:
+			if (DataEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case DataDataCompartmentEditPart.VISUAL_ID:
+			if (Content5EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ContentContentCompartment5EditPart.VISUAL_ID:
+			if (Content2EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case FinalStateFinalStateCompartment2EditPart.VISUAL_ID:
+			if (DonedataEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnEntry3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (OnExit3EditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case ServiceTemplateEditPart.VISUAL_ID:
+			if (StateEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ScriptEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (ParallelEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (DataModelEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			if (FinalStateEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		case TransitionEditPart.VISUAL_ID:
+			if (TransitionCondEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		}
+		return false;
+	}
+
+	/**
+	 * @generated
+	 */
+	public static int getLinkWithClassVisualID(EObject domainElement) {
+		if (domainElement == null) {
+			return -1;
+		}
+		if (ModelingPackage.eINSTANCE.getTransition().isSuperTypeOf(
+				domainElement.eClass())) {
+			return TransitionEditPart.VISUAL_ID;
+		}
+		return -1;
+	}
+
+	/**
+	 * User can change implementation of this method to handle some specific
+	 * situations not covered by default logic.
+	 * 
+	 * @generated
+	 */
+	private static boolean isDiagram(ServiceTemplate element) {
+		return true;
+	}
+
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingVisualIDRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message