commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gu...@apache.org
Subject svn commit: r945691 [22/39] - in /commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src: main/java/org.apache.commons.scxml.diagram/ main/java/org.apache.commons.scxml.diagram/META-INF/ main/java/org.apache.commons.scxml.diagram/icons/obj16/ main/java/org....
Date Tue, 18 May 2010 15:13:31 GMT
Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.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.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingVisualIDRegistry.java?rev=945691&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.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.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingVisualIDRegistry.java Tue May 18 15:13:13 2010
@@ -0,0 +1,1548 @@
+package org.apache.commons.scxml.modeling.diagram.part;
+
+import org.apache.commons.scxml.modeling.diagram.edit.parts.*;
+import org.apache.commons.scxml.modeling.ModelingPackage;
+import org.apache.commons.scxml.modeling.ServiceTemplate;
+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;
+			}
+			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;
+			}
+			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;
+			}
+			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;
+			}
+			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;
+			}
+			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;
+			}
+			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.getInitialState().isSuperTypeOf(
+					domainElement.eClass())) {
+				return InitialStateEditPart.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 InitialStateEditPart.VISUAL_ID:
+			if (WrappingLabelEditPart.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;
+			}
+			if (AssignExprEditPart.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 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;
+			}
+			if (AssignExpr2EditPart.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 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;
+			}
+			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;
+			}
+			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;
+			}
+			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;
+			}
+			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;
+			}
+			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;
+			}
+			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 (InitialStateEditPart.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 TranslationEditPart.VISUAL_ID:
+			if (TranslationEventEditPart.VISUAL_ID == nodeVisualID) {
+				return true;
+			}
+			break;
+		}
+		return false;
+	}
+
+	/**
+	 * @generated
+	 */
+	public static int getLinkWithClassVisualID(EObject domainElement) {
+		if (domainElement == null) {
+			return -1;
+		}
+		if (ModelingPackage.eINSTANCE.getTranslation().isSuperTypeOf(
+				domainElement.eClass())) {
+			return TranslationEditPart.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.diagram/src/org/apache/commons/scxml/modeling/diagram/part/ModelingVisualIDRegistry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramAppearancePreferencePage.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/modeling/diagram/preferences/DiagramAppearancePreferencePage.java?rev=945691&r1=945690&r2=945691&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramAppearancePreferencePage.java (original)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramAppearancePreferencePage.java Tue May 18 15:13:13 2010
@@ -1,22 +1,6 @@
-/*
- * 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.preferences;
 
-import org.apache.commons.scxml.modeling.diagram.part.ScxmlDiagramEditorPlugin;
+import org.apache.commons.scxml.modeling.diagram.part.ModelingDiagramEditorPlugin;
 import org.eclipse.gmf.runtime.diagram.ui.preferences.AppearancePreferencePage;
 
 /**
@@ -28,7 +12,7 @@ public class DiagramAppearancePreference
 	 * @generated
 	 */
 	public DiagramAppearancePreferencePage() {
-		setPreferenceStore(ScxmlDiagramEditorPlugin.getInstance()
+		setPreferenceStore(ModelingDiagramEditorPlugin.getInstance()
 				.getPreferenceStore());
 	}
 }

Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramConnectionsPreferencePage.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/modeling/diagram/preferences/DiagramConnectionsPreferencePage.java?rev=945691&r1=945690&r2=945691&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramConnectionsPreferencePage.java (original)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramConnectionsPreferencePage.java Tue May 18 15:13:13 2010
@@ -1,22 +1,6 @@
-/*
- * 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.preferences;
 
-import org.apache.commons.scxml.modeling.diagram.part.ScxmlDiagramEditorPlugin;
+import org.apache.commons.scxml.modeling.diagram.part.ModelingDiagramEditorPlugin;
 import org.eclipse.gmf.runtime.diagram.ui.preferences.ConnectionsPreferencePage;
 
 /**
@@ -28,7 +12,7 @@ public class DiagramConnectionsPreferenc
 	 * @generated
 	 */
 	public DiagramConnectionsPreferencePage() {
-		setPreferenceStore(ScxmlDiagramEditorPlugin.getInstance()
+		setPreferenceStore(ModelingDiagramEditorPlugin.getInstance()
 				.getPreferenceStore());
 	}
 }

Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramGeneralPreferencePage.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/modeling/diagram/preferences/DiagramGeneralPreferencePage.java?rev=945691&r1=945690&r2=945691&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramGeneralPreferencePage.java (original)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramGeneralPreferencePage.java Tue May 18 15:13:13 2010
@@ -1,22 +1,6 @@
-/*
- * 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.preferences;
 
-import org.apache.commons.scxml.modeling.diagram.part.ScxmlDiagramEditorPlugin;
+import org.apache.commons.scxml.modeling.diagram.part.ModelingDiagramEditorPlugin;
 import org.eclipse.gmf.runtime.diagram.ui.preferences.DiagramsPreferencePage;
 
 /**
@@ -28,7 +12,7 @@ public class DiagramGeneralPreferencePag
 	 * @generated
 	 */
 	public DiagramGeneralPreferencePage() {
-		setPreferenceStore(ScxmlDiagramEditorPlugin.getInstance()
+		setPreferenceStore(ModelingDiagramEditorPlugin.getInstance()
 				.getPreferenceStore());
 	}
 }

Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramPreferenceInitializer.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/modeling/diagram/preferences/DiagramPreferenceInitializer.java?rev=945691&r1=945690&r2=945691&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramPreferenceInitializer.java (original)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramPreferenceInitializer.java Tue May 18 15:13:13 2010
@@ -1,22 +1,6 @@
-/*
- * 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.preferences;
 
-import org.apache.commons.scxml.modeling.diagram.part.ScxmlDiagramEditorPlugin;
+import org.apache.commons.scxml.modeling.diagram.part.ModelingDiagramEditorPlugin;
 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
 import org.eclipse.jface.preference.IPreferenceStore;
 
@@ -41,6 +25,6 @@ public class DiagramPreferenceInitialize
 	 * @generated
 	 */
 	protected IPreferenceStore getPreferenceStore() {
-		return ScxmlDiagramEditorPlugin.getInstance().getPreferenceStore();
+		return ModelingDiagramEditorPlugin.getInstance().getPreferenceStore();
 	}
 }

Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramPrintingPreferencePage.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/modeling/diagram/preferences/DiagramPrintingPreferencePage.java?rev=945691&r1=945690&r2=945691&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramPrintingPreferencePage.java (original)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramPrintingPreferencePage.java Tue May 18 15:13:13 2010
@@ -1,22 +1,6 @@
-/*
- * 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.preferences;
 
-import org.apache.commons.scxml.modeling.diagram.part.ScxmlDiagramEditorPlugin;
+import org.apache.commons.scxml.modeling.diagram.part.ModelingDiagramEditorPlugin;
 import org.eclipse.gmf.runtime.diagram.ui.preferences.PrintingPreferencePage;
 
 /**
@@ -28,7 +12,7 @@ public class DiagramPrintingPreferencePa
 	 * @generated
 	 */
 	public DiagramPrintingPreferencePage() {
-		setPreferenceStore(ScxmlDiagramEditorPlugin.getInstance()
+		setPreferenceStore(ModelingDiagramEditorPlugin.getInstance()
 				.getPreferenceStore());
 	}
 }

Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramRulersAndGridPreferencePage.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/modeling/diagram/preferences/DiagramRulersAndGridPreferencePage.java?rev=945691&r1=945690&r2=945691&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramRulersAndGridPreferencePage.java (original)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/preferences/DiagramRulersAndGridPreferencePage.java Tue May 18 15:13:13 2010
@@ -1,22 +1,6 @@
-/*
- * 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.preferences;
 
-import org.apache.commons.scxml.modeling.diagram.part.ScxmlDiagramEditorPlugin;
+import org.apache.commons.scxml.modeling.diagram.part.ModelingDiagramEditorPlugin;
 import org.eclipse.gmf.runtime.diagram.ui.preferences.RulerGridPreferencePage;
 
 /**
@@ -28,7 +12,7 @@ public class DiagramRulersAndGridPrefere
 	 * @generated
 	 */
 	public DiagramRulersAndGridPreferencePage() {
-		setPreferenceStore(ScxmlDiagramEditorPlugin.getInstance()
+		setPreferenceStore(ModelingDiagramEditorPlugin.getInstance()
 				.getPreferenceStore());
 	}
 }

Modified: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/providers/ElementInitializers.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/modeling/diagram/providers/ElementInitializers.java?rev=945691&r1=945690&r2=945691&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/providers/ElementInitializers.java (original)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/providers/ElementInitializers.java Tue May 18 15:13:13 2010
@@ -1,19 +1,3 @@
-/*
- * 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.providers;
 
 /**

Added: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/providers/ModelingEditPartProvider.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/modeling/diagram/providers/ModelingEditPartProvider.java?rev=945691&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/providers/ModelingEditPartProvider.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/providers/ModelingEditPartProvider.java Tue May 18 15:13:13 2010
@@ -0,0 +1,142 @@
+package org.apache.commons.scxml.modeling.diagram.providers;
+
+import java.lang.ref.WeakReference;
+
+import org.apache.commons.scxml.modeling.diagram.edit.parts.ModelingEditPartFactory;
+import org.apache.commons.scxml.modeling.diagram.edit.parts.ServiceTemplateEditPart;
+import org.apache.commons.scxml.modeling.diagram.part.ModelingVisualIDRegistry;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPartFactory;
+import org.eclipse.gmf.runtime.common.core.service.IOperation;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.AbstractEditPartProvider;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.CreateGraphicEditPartOperation;
+import org.eclipse.gmf.runtime.diagram.ui.services.editpart.IEditPartOperation;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * @generated
+ */
+public class ModelingEditPartProvider extends AbstractEditPartProvider {
+
+	/**
+	 * @generated
+	 */
+	private EditPartFactory factory;
+
+	/**
+	 * @generated
+	 */
+	private boolean allowCaching;
+
+	/**
+	 * @generated
+	 */
+	private WeakReference cachedPart;
+
+	/**
+	 * @generated
+	 */
+	private WeakReference cachedView;
+
+	/**
+	 * @generated
+	 */
+	public ModelingEditPartProvider() {
+		setFactory(new ModelingEditPartFactory());
+		setAllowCaching(true);
+	}
+
+	/**
+	 * @generated
+	 */
+	public final EditPartFactory getFactory() {
+		return factory;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected void setFactory(EditPartFactory factory) {
+		this.factory = factory;
+	}
+
+	/**
+	 * @generated
+	 */
+	public final boolean isAllowCaching() {
+		return allowCaching;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected synchronized void setAllowCaching(boolean allowCaching) {
+		this.allowCaching = allowCaching;
+		if (!allowCaching) {
+			cachedPart = null;
+			cachedView = null;
+		}
+	}
+
+	/**
+	 * @generated
+	 */
+	protected IGraphicalEditPart createEditPart(View view) {
+		EditPart part = factory.createEditPart(null, view);
+		if (part instanceof IGraphicalEditPart) {
+			return (IGraphicalEditPart) part;
+		}
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	protected IGraphicalEditPart getCachedPart(View view) {
+		if (cachedView != null && cachedView.get() == view) {
+			return (IGraphicalEditPart) cachedPart.get();
+		}
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	public synchronized IGraphicalEditPart createGraphicEditPart(View view) {
+		if (isAllowCaching()) {
+			IGraphicalEditPart part = getCachedPart(view);
+			cachedPart = null;
+			cachedView = null;
+			if (part != null) {
+				return part;
+			}
+		}
+		return createEditPart(view);
+	}
+
+	/**
+	 * @generated
+	 */
+	public synchronized boolean provides(IOperation operation) {
+		if (operation instanceof CreateGraphicEditPartOperation) {
+			View view = ((IEditPartOperation) operation).getView();
+			if (!ServiceTemplateEditPart.MODEL_ID
+					.equals(ModelingVisualIDRegistry.getModelID(view))) {
+				return false;
+			}
+			if (isAllowCaching() && getCachedPart(view) != null) {
+				return true;
+			}
+			IGraphicalEditPart part = createEditPart(view);
+			if (part != null) {
+				if (isAllowCaching()) {
+					cachedPart = new WeakReference(part);
+					cachedView = new WeakReference(view);
+				}
+				return true;
+			}
+		}
+		return false;
+	}
+}

Propchange: commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/providers/ModelingEditPartProvider.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/modeling/diagram/providers/ModelingElementTypes.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/modeling/diagram/providers/ModelingElementTypes.java?rev=945691&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/providers/ModelingElementTypes.java (added)
+++ commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.diagram/src/org/apache/commons/scxml/modeling/diagram/providers/ModelingElementTypes.java Tue May 18 15:13:13 2010
@@ -0,0 +1,587 @@
+package org.apache.commons.scxml.modeling.diagram.providers;
+
+import java.util.HashSet;
+import java.util.IdentityHashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.scxml.modeling.diagram.part.ModelingDiagramEditorPlugin;
+import org.apache.commons.scxml.modeling.ModelingPackage;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @generated
+ */
+public class ModelingElementTypes extends ElementInitializers {
+
+	/**
+	 * @generated
+	 */
+	private ModelingElementTypes() {
+	}
+
+	/**
+	 * @generated
+	 */
+	private static Map elements;
+
+	/**
+	 * @generated
+	 */
+	private static ImageRegistry imageRegistry;
+
+	/**
+	 * @generated
+	 */
+	private static Set KNOWN_ELEMENT_TYPES;
+
+	/**
+	 * @generated
+	 */
+	public static final IElementType ServiceTemplate_79 = getElementType("org.apache.commons.scxml.modeling.diagram.ServiceTemplate_79"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType State_1001 = getElementType("org.apache.commons.scxml.modeling.diagram.State_1001"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType InitialState_1002 = getElementType("org.apache.commons.scxml.modeling.diagram.InitialState_1002"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Script_1003 = getElementType("org.apache.commons.scxml.modeling.diagram.Script_1003"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Parallel_1004 = getElementType("org.apache.commons.scxml.modeling.diagram.Parallel_1004"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType DataModel_1005 = getElementType("org.apache.commons.scxml.modeling.diagram.DataModel_1005"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType FinalState_1006 = getElementType("org.apache.commons.scxml.modeling.diagram.FinalState_1006"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType OnEntry_2001 = getElementType("org.apache.commons.scxml.modeling.diagram.OnEntry_2001"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType If_2002 = getElementType("org.apache.commons.scxml.modeling.diagram.If_2002"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType ElseIf_2003 = getElementType("org.apache.commons.scxml.modeling.diagram.ElseIf_2003"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Else_2004 = getElementType("org.apache.commons.scxml.modeling.diagram.Else_2004"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Assign_2005 = getElementType("org.apache.commons.scxml.modeling.diagram.Assign_2005"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Raise_2006 = getElementType("org.apache.commons.scxml.modeling.diagram.Raise_2006"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Log_2007 = getElementType("org.apache.commons.scxml.modeling.diagram.Log_2007"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Validate_2008 = getElementType("org.apache.commons.scxml.modeling.diagram.Validate_2008"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Cancel_2009 = getElementType("org.apache.commons.scxml.modeling.diagram.Cancel_2009"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Send_2010 = getElementType("org.apache.commons.scxml.modeling.diagram.Send_2010"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Param_2011 = getElementType("org.apache.commons.scxml.modeling.diagram.Param_2011"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Content_2012 = getElementType("org.apache.commons.scxml.modeling.diagram.Content_2012"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Content_2013 = getElementType("org.apache.commons.scxml.modeling.diagram.Content_2013"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Param_2014 = getElementType("org.apache.commons.scxml.modeling.diagram.Param_2014"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Script_2015 = getElementType("org.apache.commons.scxml.modeling.diagram.Script_2015"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType OnExit_2016 = getElementType("org.apache.commons.scxml.modeling.diagram.OnExit_2016"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType If_2017 = getElementType("org.apache.commons.scxml.modeling.diagram.If_2017"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Assign_2018 = getElementType("org.apache.commons.scxml.modeling.diagram.Assign_2018"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Raise_2019 = getElementType("org.apache.commons.scxml.modeling.diagram.Raise_2019"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Log_2020 = getElementType("org.apache.commons.scxml.modeling.diagram.Log_2020"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Validate_2021 = getElementType("org.apache.commons.scxml.modeling.diagram.Validate_2021"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Cancel_2022 = getElementType("org.apache.commons.scxml.modeling.diagram.Cancel_2022"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Param_2023 = getElementType("org.apache.commons.scxml.modeling.diagram.Param_2023"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Send_2024 = getElementType("org.apache.commons.scxml.modeling.diagram.Send_2024"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Script_2025 = getElementType("org.apache.commons.scxml.modeling.diagram.Script_2025"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Invoke_2026 = getElementType("org.apache.commons.scxml.modeling.diagram.Invoke_2026"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Finalize_2027 = getElementType("org.apache.commons.scxml.modeling.diagram.Finalize_2027"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Param_2028 = getElementType("org.apache.commons.scxml.modeling.diagram.Param_2028"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Content_2029 = getElementType("org.apache.commons.scxml.modeling.diagram.Content_2029"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType InitialState_2030 = getElementType("org.apache.commons.scxml.modeling.diagram.InitialState_2030"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType HistoryState_2031 = getElementType("org.apache.commons.scxml.modeling.diagram.HistoryState_2031"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Parallel_2032 = getElementType("org.apache.commons.scxml.modeling.diagram.Parallel_2032"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType HistoryState_2033 = getElementType("org.apache.commons.scxml.modeling.diagram.HistoryState_2033"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Anchor_2034 = getElementType("org.apache.commons.scxml.modeling.diagram.Anchor_2034"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Parallel_2035 = getElementType("org.apache.commons.scxml.modeling.diagram.Parallel_2035"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType OnEntry_2036 = getElementType("org.apache.commons.scxml.modeling.diagram.OnEntry_2036"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType OnExit_2037 = getElementType("org.apache.commons.scxml.modeling.diagram.OnExit_2037"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType State_2038 = getElementType("org.apache.commons.scxml.modeling.diagram.State_2038"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Anchor_2039 = getElementType("org.apache.commons.scxml.modeling.diagram.Anchor_2039"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType FinalState_2040 = getElementType("org.apache.commons.scxml.modeling.diagram.FinalState_2040"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Donedata_2041 = getElementType("org.apache.commons.scxml.modeling.diagram.Donedata_2041"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Param_2042 = getElementType("org.apache.commons.scxml.modeling.diagram.Param_2042"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Content_2043 = getElementType("org.apache.commons.scxml.modeling.diagram.Content_2043"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType OnEntry_2044 = getElementType("org.apache.commons.scxml.modeling.diagram.OnEntry_2044"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType OnExit_2045 = getElementType("org.apache.commons.scxml.modeling.diagram.OnExit_2045"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType State_2046 = getElementType("org.apache.commons.scxml.modeling.diagram.State_2046"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Data_2047 = getElementType("org.apache.commons.scxml.modeling.diagram.Data_2047"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Content_2048 = getElementType("org.apache.commons.scxml.modeling.diagram.Content_2048"); //$NON-NLS-1$
+	/**
+	 * @generated
+	 */
+	public static final IElementType Translation_3001 = getElementType("org.apache.commons.scxml.modeling.diagram.Translation_3001"); //$NON-NLS-1$
+
+	/**
+	 * @generated
+	 */
+	private static ImageRegistry getImageRegistry() {
+		if (imageRegistry == null) {
+			imageRegistry = new ImageRegistry();
+		}
+		return imageRegistry;
+	}
+
+	/**
+	 * @generated
+	 */
+	private static String getImageRegistryKey(ENamedElement element) {
+		return element.getName();
+	}
+
+	/**
+	 * @generated
+	 */
+	private static ImageDescriptor getProvidedImageDescriptor(
+			ENamedElement element) {
+		if (element instanceof EStructuralFeature) {
+			EStructuralFeature feature = ((EStructuralFeature) element);
+			EClass eContainingClass = feature.getEContainingClass();
+			EClassifier eType = feature.getEType();
+			if (eContainingClass != null && !eContainingClass.isAbstract()) {
+				element = eContainingClass;
+			} else if (eType instanceof EClass
+					&& !((EClass) eType).isAbstract()) {
+				element = eType;
+			}
+		}
+		if (element instanceof EClass) {
+			EClass eClass = (EClass) element;
+			if (!eClass.isAbstract()) {
+				return ModelingDiagramEditorPlugin.getInstance()
+						.getItemImageDescriptor(
+								eClass.getEPackage().getEFactoryInstance()
+										.create(eClass));
+			}
+		}
+		// TODO : support structural features
+		return null;
+	}
+
+	/**
+	 * @generated
+	 */
+	public static ImageDescriptor getImageDescriptor(ENamedElement element) {
+		String key = getImageRegistryKey(element);
+		ImageDescriptor imageDescriptor = getImageRegistry().getDescriptor(key);
+		if (imageDescriptor == null) {
+			imageDescriptor = getProvidedImageDescriptor(element);
+			if (imageDescriptor == null) {
+				imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
+			}
+			getImageRegistry().put(key, imageDescriptor);
+		}
+		return imageDescriptor;
+	}
+
+	/**
+	 * @generated
+	 */
+	public static Image getImage(ENamedElement element) {
+		String key = getImageRegistryKey(element);
+		Image image = getImageRegistry().get(key);
+		if (image == null) {
+			ImageDescriptor imageDescriptor = getProvidedImageDescriptor(element);
+			if (imageDescriptor == null) {
+				imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
+			}
+			getImageRegistry().put(key, imageDescriptor);
+			image = getImageRegistry().get(key);
+		}
+		return image;
+	}
+
+	/**
+	 * @generated
+	 */
+	public static ImageDescriptor getImageDescriptor(IAdaptable hint) {
+		ENamedElement element = getElement(hint);
+		if (element == null) {
+			return null;
+		}
+		return getImageDescriptor(element);
+	}
+
+	/**
+	 * @generated
+	 */
+	public static Image getImage(IAdaptable hint) {
+		ENamedElement element = getElement(hint);
+		if (element == null) {
+			return null;
+		}
+		return getImage(element);
+	}
+
+	/**
+	 * Returns 'type' of the ecore object associated with the hint.
+	 * 
+	 * @generated
+	 */
+	public static ENamedElement getElement(IAdaptable hint) {
+		Object type = hint.getAdapter(IElementType.class);
+		if (elements == null) {
+			elements = new IdentityHashMap();
+
+			elements.put(ServiceTemplate_79, ModelingPackage.eINSTANCE
+					.getServiceTemplate());
+
+			elements.put(State_1001, ModelingPackage.eINSTANCE.getState());
+
+			elements.put(InitialState_1002, ModelingPackage.eINSTANCE
+					.getInitialState());
+
+			elements.put(Script_1003, ModelingPackage.eINSTANCE.getScript());
+
+			elements
+					.put(Parallel_1004, ModelingPackage.eINSTANCE.getParallel());
+
+			elements.put(DataModel_1005, ModelingPackage.eINSTANCE
+					.getDataModel());
+
+			elements.put(FinalState_1006, ModelingPackage.eINSTANCE
+					.getFinalState());
+
+			elements.put(OnEntry_2001, ModelingPackage.eINSTANCE.getOnEntry());
+
+			elements.put(If_2002, ModelingPackage.eINSTANCE.getIf());
+
+			elements.put(ElseIf_2003, ModelingPackage.eINSTANCE.getElseIf());
+
+			elements.put(Else_2004, ModelingPackage.eINSTANCE.getElse());
+
+			elements.put(Assign_2005, ModelingPackage.eINSTANCE.getAssign());
+
+			elements.put(Raise_2006, ModelingPackage.eINSTANCE.getRaise());
+
+			elements.put(Log_2007, ModelingPackage.eINSTANCE.getLog());
+
+			elements
+					.put(Validate_2008, ModelingPackage.eINSTANCE.getValidate());
+
+			elements.put(Cancel_2009, ModelingPackage.eINSTANCE.getCancel());
+
+			elements.put(Send_2010, ModelingPackage.eINSTANCE.getSend());
+
+			elements.put(Param_2011, ModelingPackage.eINSTANCE.getParam());
+
+			elements.put(Content_2012, ModelingPackage.eINSTANCE.getContent());
+
+			elements.put(Content_2013, ModelingPackage.eINSTANCE.getContent());
+
+			elements.put(Param_2014, ModelingPackage.eINSTANCE.getParam());
+
+			elements.put(Script_2015, ModelingPackage.eINSTANCE.getScript());
+
+			elements.put(OnExit_2016, ModelingPackage.eINSTANCE.getOnExit());
+
+			elements.put(If_2017, ModelingPackage.eINSTANCE.getIf());
+
+			elements.put(Assign_2018, ModelingPackage.eINSTANCE.getAssign());
+
+			elements.put(Raise_2019, ModelingPackage.eINSTANCE.getRaise());
+
+			elements.put(Log_2020, ModelingPackage.eINSTANCE.getLog());
+
+			elements
+					.put(Validate_2021, ModelingPackage.eINSTANCE.getValidate());
+
+			elements.put(Cancel_2022, ModelingPackage.eINSTANCE.getCancel());
+
+			elements.put(Param_2023, ModelingPackage.eINSTANCE.getParam());
+
+			elements.put(Send_2024, ModelingPackage.eINSTANCE.getSend());
+
+			elements.put(Script_2025, ModelingPackage.eINSTANCE.getScript());
+
+			elements.put(Invoke_2026, ModelingPackage.eINSTANCE.getInvoke());
+
+			elements
+					.put(Finalize_2027, ModelingPackage.eINSTANCE.getFinalize());
+
+			elements.put(Param_2028, ModelingPackage.eINSTANCE.getParam());
+
+			elements.put(Content_2029, ModelingPackage.eINSTANCE.getContent());
+
+			elements.put(InitialState_2030, ModelingPackage.eINSTANCE
+					.getInitialState());
+
+			elements.put(HistoryState_2031, ModelingPackage.eINSTANCE
+					.getHistoryState());
+
+			elements
+					.put(Parallel_2032, ModelingPackage.eINSTANCE.getParallel());
+
+			elements.put(HistoryState_2033, ModelingPackage.eINSTANCE
+					.getHistoryState());
+
+			elements.put(Anchor_2034, ModelingPackage.eINSTANCE.getAnchor());
+
+			elements
+					.put(Parallel_2035, ModelingPackage.eINSTANCE.getParallel());
+
+			elements.put(OnEntry_2036, ModelingPackage.eINSTANCE.getOnEntry());
+
+			elements.put(OnExit_2037, ModelingPackage.eINSTANCE.getOnExit());
+
+			elements.put(State_2038, ModelingPackage.eINSTANCE.getState());
+
+			elements.put(Anchor_2039, ModelingPackage.eINSTANCE.getAnchor());
+
+			elements.put(FinalState_2040, ModelingPackage.eINSTANCE
+					.getFinalState());
+
+			elements
+					.put(Donedata_2041, ModelingPackage.eINSTANCE.getDonedata());
+
+			elements.put(Param_2042, ModelingPackage.eINSTANCE.getParam());
+
+			elements.put(Content_2043, ModelingPackage.eINSTANCE.getContent());
+
+			elements.put(OnEntry_2044, ModelingPackage.eINSTANCE.getOnEntry());
+
+			elements.put(OnExit_2045, ModelingPackage.eINSTANCE.getOnExit());
+
+			elements.put(State_2046, ModelingPackage.eINSTANCE.getState());
+
+			elements.put(Data_2047, ModelingPackage.eINSTANCE.getData());
+
+			elements.put(Content_2048, ModelingPackage.eINSTANCE.getContent());
+
+			elements.put(Translation_3001, ModelingPackage.eINSTANCE
+					.getTranslation());
+		}
+		return (ENamedElement) elements.get(type);
+	}
+
+	/**
+	 * @generated
+	 */
+	private static IElementType getElementType(String id) {
+		return ElementTypeRegistry.getInstance().getType(id);
+	}
+
+	/**
+	 * @generated
+	 */
+	public static boolean isKnownElementType(IElementType elementType) {
+		if (KNOWN_ELEMENT_TYPES == null) {
+			KNOWN_ELEMENT_TYPES = new HashSet();
+			KNOWN_ELEMENT_TYPES.add(ServiceTemplate_79);
+			KNOWN_ELEMENT_TYPES.add(State_1001);
+			KNOWN_ELEMENT_TYPES.add(InitialState_1002);
+			KNOWN_ELEMENT_TYPES.add(Script_1003);
+			KNOWN_ELEMENT_TYPES.add(Parallel_1004);
+			KNOWN_ELEMENT_TYPES.add(DataModel_1005);
+			KNOWN_ELEMENT_TYPES.add(FinalState_1006);
+			KNOWN_ELEMENT_TYPES.add(OnEntry_2001);
+			KNOWN_ELEMENT_TYPES.add(If_2002);
+			KNOWN_ELEMENT_TYPES.add(ElseIf_2003);
+			KNOWN_ELEMENT_TYPES.add(Else_2004);
+			KNOWN_ELEMENT_TYPES.add(Assign_2005);
+			KNOWN_ELEMENT_TYPES.add(Raise_2006);
+			KNOWN_ELEMENT_TYPES.add(Log_2007);
+			KNOWN_ELEMENT_TYPES.add(Validate_2008);
+			KNOWN_ELEMENT_TYPES.add(Cancel_2009);
+			KNOWN_ELEMENT_TYPES.add(Send_2010);
+			KNOWN_ELEMENT_TYPES.add(Param_2011);
+			KNOWN_ELEMENT_TYPES.add(Content_2012);
+			KNOWN_ELEMENT_TYPES.add(Content_2013);
+			KNOWN_ELEMENT_TYPES.add(Param_2014);
+			KNOWN_ELEMENT_TYPES.add(Script_2015);
+			KNOWN_ELEMENT_TYPES.add(OnExit_2016);
+			KNOWN_ELEMENT_TYPES.add(If_2017);
+			KNOWN_ELEMENT_TYPES.add(Assign_2018);
+			KNOWN_ELEMENT_TYPES.add(Raise_2019);
+			KNOWN_ELEMENT_TYPES.add(Log_2020);
+			KNOWN_ELEMENT_TYPES.add(Validate_2021);
+			KNOWN_ELEMENT_TYPES.add(Cancel_2022);
+			KNOWN_ELEMENT_TYPES.add(Param_2023);
+			KNOWN_ELEMENT_TYPES.add(Send_2024);
+			KNOWN_ELEMENT_TYPES.add(Script_2025);
+			KNOWN_ELEMENT_TYPES.add(Invoke_2026);
+			KNOWN_ELEMENT_TYPES.add(Finalize_2027);
+			KNOWN_ELEMENT_TYPES.add(Param_2028);
+			KNOWN_ELEMENT_TYPES.add(Content_2029);
+			KNOWN_ELEMENT_TYPES.add(InitialState_2030);
+			KNOWN_ELEMENT_TYPES.add(HistoryState_2031);
+			KNOWN_ELEMENT_TYPES.add(Parallel_2032);
+			KNOWN_ELEMENT_TYPES.add(HistoryState_2033);
+			KNOWN_ELEMENT_TYPES.add(Anchor_2034);
+			KNOWN_ELEMENT_TYPES.add(Parallel_2035);
+			KNOWN_ELEMENT_TYPES.add(OnEntry_2036);
+			KNOWN_ELEMENT_TYPES.add(OnExit_2037);
+			KNOWN_ELEMENT_TYPES.add(State_2038);
+			KNOWN_ELEMENT_TYPES.add(Anchor_2039);
+			KNOWN_ELEMENT_TYPES.add(FinalState_2040);
+			KNOWN_ELEMENT_TYPES.add(Donedata_2041);
+			KNOWN_ELEMENT_TYPES.add(Param_2042);
+			KNOWN_ELEMENT_TYPES.add(Content_2043);
+			KNOWN_ELEMENT_TYPES.add(OnEntry_2044);
+			KNOWN_ELEMENT_TYPES.add(OnExit_2045);
+			KNOWN_ELEMENT_TYPES.add(State_2046);
+			KNOWN_ELEMENT_TYPES.add(Data_2047);
+			KNOWN_ELEMENT_TYPES.add(Content_2048);
+			KNOWN_ELEMENT_TYPES.add(Translation_3001);
+		}
+		return KNOWN_ELEMENT_TYPES.contains(elementType);
+	}
+
+}

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



Mime
View raw message