/** @generated */
 public static ElementInitializers getInstance() {
   ElementInitializers cached = UMLDiagramEditorPlugin.getInstance().getElementInitializers();
   if (cached == null) {
     UMLDiagramEditorPlugin.getInstance()
         .setElementInitializers(cached = new ElementInitializers());
   }
   return cached;
 }
  /** @generated */
  public void init_Constraint_2008(Constraint instance) {
    try {
      OpaqueExpression newInstance_0_0 = UMLFactory.eINSTANCE.createOpaqueExpression();
      instance.setSpecification(newInstance_0_0);
      Object value_0_0_0 =
          UMLOCLFactory.getExpression(13, UMLPackage.eINSTANCE.getOpaqueExpression(), null)
              .evaluate(newInstance_0_0);
      if (value_0_0_0 instanceof Collection) {
        newInstance_0_0.getLanguages().clear();
        newInstance_0_0.getLanguages().addAll(((Collection) value_0_0_0));
      } else {
        newInstance_0_0.getLanguages().add((String) value_0_0_0);
      }
      Object value_0_0_1 =
          UMLOCLFactory.getExpression(14, UMLPackage.eINSTANCE.getOpaqueExpression(), null)
              .evaluate(newInstance_0_0);
      if (value_0_0_1 instanceof Collection) {
        newInstance_0_0.getBodies().clear();
        newInstance_0_0.getBodies().addAll(((Collection) value_0_0_1));
      } else {
        newInstance_0_0.getBodies().add((String) value_0_0_1);
      }

    } catch (RuntimeException e) {
      UMLDiagramEditorPlugin.getInstance()
          .logError("Element initialization failed", e); // $NON-NLS-1$				
    }
  }
 /** @generated */
 public void init_Image_3010(Image instance) {
   try {
     Object value_0 =
         UMLOCLFactory.getExpression(6, UMLPackage.eINSTANCE.getImage(), null).evaluate(instance);
     instance.setLocation((String) value_0);
   } catch (RuntimeException e) {
     UMLDiagramEditorPlugin.getInstance()
         .logError("Element initialization failed", e); // $NON-NLS-1$				
   }
 }
 /** @generated */
 public void init_EnumerationLiteral_3005(EnumerationLiteral instance) {
   try {
     Object value_0 =
         UMLOCLFactory.getExpression(10, UMLPackage.eINSTANCE.getEnumerationLiteral(), null)
             .evaluate(instance);
     instance.setName((String) value_0);
   } catch (RuntimeException e) {
     UMLDiagramEditorPlugin.getInstance()
         .logError("Element initialization failed", e); // $NON-NLS-1$				
   }
 }
 /** @generated */
 @SuppressWarnings("rawtypes")
 public Object evaluate(Object context, Map env) {
   if (context().isInstance(context)) {
     try {
       return doEvaluate(context, env);
     } catch (Exception e) {
       UMLDiagramEditorPlugin.getInstance()
           .logError("Expression evaluation failure: " + body(), e); // $NON-NLS-1$
     }
   }
   return null;
 }
 /** @generated */
 protected void setStatus(int severity, String message, Throwable throwable) {
   String pluginID = UMLDiagramEditorPlugin.ID;
   this.status =
       new Status(
           severity, pluginID, -1, (message != null) ? message : "", throwable); // $NON-NLS-1$
   if (!this.status.isOK()) {
     UMLDiagramEditorPlugin.getInstance()
         .logError(
             "Expression problem:" + message + "body:" + body(),
             throwable); //$NON-NLS-1$ //$NON-NLS-2$
   }
 }