/** @generated */
 protected Command getCreateCommand(CreateElementRequest req) {
   if (PageflowElementTypes.InitState_1001 == req.getElementType()) {
     if (req.getContainmentFeature() == null) {
       req.setContainmentFeature(PageflowPackage.eINSTANCE.getPageflow_States());
     }
     return getGEFWrapper(new InitStateCreateCommand(req));
   }
   if (PageflowElementTypes.DecisionState_1002 == req.getElementType()) {
     if (req.getContainmentFeature() == null) {
       req.setContainmentFeature(PageflowPackage.eINSTANCE.getPageflow_States());
     }
     return getGEFWrapper(new DecisionStateCreateCommand(req));
   }
   if (PageflowElementTypes.EndState_1003 == req.getElementType()) {
     if (req.getContainmentFeature() == null) {
       req.setContainmentFeature(PageflowPackage.eINSTANCE.getPageflow_States());
     }
     return getGEFWrapper(new EndStateCreateCommand(req));
   }
   if (PageflowElementTypes.ViewState_1004 == req.getElementType()) {
     if (req.getContainmentFeature() == null) {
       req.setContainmentFeature(PageflowPackage.eINSTANCE.getPageflow_States());
     }
     return getGEFWrapper(new ViewStateCreateCommand(req));
   }
   if (PageflowElementTypes.SubPageflowState_1005 == req.getElementType()) {
     if (req.getContainmentFeature() == null) {
       req.setContainmentFeature(PageflowPackage.eINSTANCE.getPageflow_States());
     }
     return getGEFWrapper(new SubPageflowStateCreateCommand(req));
   }
   return super.getCreateCommand(req);
 }
 /** @generated */
 protected Command getCreateCommand(CreateElementRequest req) {
   if (FlowDesigner.diagram.providers.FlowDesignerElementTypes.ActionState_2009
       == req.getElementType()) {
     if (req.getContainmentFeature() == null) {
       req.setContainmentFeature(FlowDesigner.FlowDesignerPackage.eINSTANCE.getFlow_States());
     }
     return getGEFWrapper(new FlowDesigner.diagram.edit.commands.ActionStateCreateCommand(req));
   }
   if (FlowDesigner.diagram.providers.FlowDesignerElementTypes.FinalState_2010
       == req.getElementType()) {
     if (req.getContainmentFeature() == null) {
       req.setContainmentFeature(FlowDesigner.FlowDesignerPackage.eINSTANCE.getFlow_FinalState());
     }
     return getGEFWrapper(new FlowDesigner.diagram.edit.commands.FinalStateCreateCommand(req));
   }
   if (FlowDesigner.diagram.providers.FlowDesignerElementTypes.InitialState_2011
       == req.getElementType()) {
     if (req.getContainmentFeature() == null) {
       req.setContainmentFeature(
           FlowDesigner.FlowDesignerPackage.eINSTANCE.getFlow_InitialState());
     }
     return getGEFWrapper(new FlowDesigner.diagram.edit.commands.InitialStateCreateCommand(req));
   }
   if (FlowDesigner.diagram.providers.FlowDesignerElementTypes.ViewState_2012
       == req.getElementType()) {
     if (req.getContainmentFeature() == null) {
       req.setContainmentFeature(FlowDesigner.FlowDesignerPackage.eINSTANCE.getFlow_States());
     }
     return getGEFWrapper(new FlowDesigner.diagram.edit.commands.ViewStateCreateCommand(req));
   }
   return super.getCreateCommand(req);
 }
 /** @generated */
 protected Command getCreateCommand(CreateElementRequest req) {
   if (hub.top.adaptiveSystem.diagram.providers.AdaptiveSystemElementTypes.PreNet_2003
       == req.getElementType()) {
     if (req.getContainmentFeature() == null) {
       req.setContainmentFeature(
           hub.top.adaptiveSystem.AdaptiveSystemPackage.eINSTANCE.getOclet_PreNet());
     }
     return getGEFWrapper(
         new hub.top.adaptiveSystem.diagram.edit.commands.PreNetCreateCommand(req));
   }
   if (hub.top.adaptiveSystem.diagram.providers.AdaptiveSystemElementTypes.DoNet_2006
       == req.getElementType()) {
     if (req.getContainmentFeature() == null) {
       req.setContainmentFeature(
           hub.top.adaptiveSystem.AdaptiveSystemPackage.eINSTANCE.getOclet_DoNet());
     }
     return getGEFWrapper(
         new hub.top.adaptiveSystem.diagram.edit.commands.DoNetCreateCommand(req));
   }
   return super.getCreateCommand(req);
 }
 /** @generated */
 protected Command getCreateCommand(CreateElementRequest req) {
   IElementType requestElementType = req.getElementType();
   if (requestElementType == null) {
     return super.getCreateCommand(req);
   }
   IElementType baseElementType = requestElementType;
   boolean isExtendedType = false;
   if (requestElementType instanceof IExtendedHintedElementType) {
     baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
     if (baseElementType != null) {
       isExtendedType = true;
     } else {
       // no reference element type ID. using the closest super element type to give more
       // opportunities, but can lead to bugs.
       baseElementType =
           ElementTypeUtils.findClosestNonExtendedElementType(
               (IExtendedHintedElementType) requestElementType);
       isExtendedType = true;
     }
   }
   if (UMLElementTypes.InitialNode_3004 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.ActivityFinalNode_3005 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.FlowFinalNode_3006 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.OpaqueAction_3007 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.CallBehaviorAction_3008 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.CallOperationAction_3010 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.DecisionNode_3038 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.MergeNode_3039 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.ForkNode_3040 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.JoinNode_3041 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.DataStoreNode_3078 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.SendObjectAction_3042 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.SendSignalAction_3052 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.AcceptEventAction_3063 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.ValueSpecificationAction_3076 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.ConditionalNode_3069 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedGroup();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.ExpansionRegion_3070 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedGroup();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.LoopNode_3071 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedGroup();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.SequenceNode_3073 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedGroup();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.StructuredActivityNode_3065 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedGroup();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.ReadSelfAction_3081 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.ActivityPartition_3067 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedGroup();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.DurationConstraint_3034 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getAction_LocalPrecondition();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.DurationConstraint_3035 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getAction_LocalPostcondition();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.TimeConstraint_3036 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getAction_LocalPrecondition();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.TimeConstraint_3037 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getAction_LocalPostcondition();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.IntervalConstraint_3032 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getAction_LocalPrecondition();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.IntervalConstraint_3033 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getAction_LocalPostcondition();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.Constraint_3011 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getAction_LocalPrecondition();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.Constraint_3012 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getAction_LocalPostcondition();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.CreateObjectAction_3086 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.ReadStructuralFeatureAction_3088 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.AddStructuralFeatureValueAction_3091 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.DestroyObjectAction_3095 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.ReadVariableAction_3097 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.AddVariableValueAction_3099 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.BroadcastSignalAction_3102 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.CentralBufferNode_3104 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getActivity_OwnedNode();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.Comment_3080 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getElement_OwnedComment();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   if (UMLElementTypes.Constraint_3112 == baseElementType) {
     // adjust the containment feature
     EReference containmentFeature = UMLPackage.eINSTANCE.getNamespace_OwnedRule();
     req.setContainmentFeature(containmentFeature);
     if (isExtendedType) {
       return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType) requestElementType);
     }
     return getGEFWrapper(getSemanticCreationCommand(req));
   }
   return super.getCreateCommand(req);
 }