system/src/sc/lang/java/BodyTypeDeclaration.java
public void updateType(BodyTypeDeclaration newType, ExecutionContext ctx, TypeUpdateMode updateMode, boolean updateInstances, UpdateInstanceInfo info) {
      if (info == null && updateInstances)
         System.out.println("*** Error - no update instance info and updating instances");
      if (typeName == null || newType.typeName == null) {
         displayError("updateType - skipping update for type with no name.");
         return;
      }
      // Are we removing a type layer?  If so we first modify the previous type, then remove this type
      if (updateMode == TypeUpdateMode.Remove && this instanceof ModifyDeclaration) {
         ModifyDeclaration modThis = (ModifyDeclaration) this;
         BodyTypeDeclaration nextToRemove = modThis.getModifiedType();
         // Need to unpeel the onion, so we remove the earliest type first, then the later ones.  TODO: possibly move this out one level to updateModel?
         if (nextToRemove != newType) {
            nextToRemove.updateType(newType, ctx, updateMode, updateInstances, info);
            modThis.updateExtendsType(newType, true, false);
            updateType(newType, ctx, updateMode, updateInstances, info);
            return;
         }
      }

      boolean activated = layer != null && layer.activated;

      if (!getTypeClassName().equals(newType.getTypeClassName())) {
         displayError("Invalid updateType - expected type: " + typeName + " but found: " + newType.typeName + " for: ");
         return;
      }

      UpdateTypeCtx tctx = buildUpdateTypeContext(newType, updateMode, info, activated);

      updateTypeInternals(tctx, newType, ctx, updateMode, updateInstances, info, true);

      // Start the type after it's fully registered into the new type system so any new references we create point
      // to the new model.  If we are batching updates do not start the type here.  We may be updating many types and
      // if we start it here, we'll resolve references to other types that will become stale.
      if (activated && updateMode != TypeUpdateMode.Remove && info == null)
         ParseUtil.realInitAndStartComponent(newType);

      completeUpdateType(tctx, newType, ctx, updateMode, updateInstances, info, true, activated);
   }
/**
    * Updates this type with the new type.  If replacesType is true, we are replacing this exact type.  If it is false
    * we are adding a new layered version of this type.  In other words, adding a new modify that modifies this type.
    */
Updates this type with the new type.  If replacesType is true, we are replacing this exact type.  If it is false
we are adding a new layered version of this type.  In other words, adding a new modify that modifies this type.
Updates this type with the new type . If replacesType is true we are replacing this exact type . If it is false we are adding a new layered version of this type . In other words adding a new modify that modifies this type .
public void updateType(BodyTypeDeclaration newType, ExecutionContext ctx, TypeUpdateMode updateMode, boolean updateInstances, UpdateInstanceInfo info) {
      if (info == null && updateInstances)
         System.out.println("*** Error - no update instance info and updating instances");
      if (typeName == null || newType.typeName == null) {
         displayError("updateType - skipping update for type with no name.");
         return;
      }
      if (updateMode == TypeUpdateMode.Remove && this instanceof ModifyDeclaration) {
         ModifyDeclaration modThis = (ModifyDeclaration) this;
         BodyTypeDeclaration nextToRemove = modThis.getModifiedType();
         if (nextToRemove != newType) {
            nextToRemove.updateType(newType, ctx, updateMode, updateInstances, info);
            modThis.updateExtendsType(newType, true, false);
            updateType(newType, ctx, updateMode, updateInstances, info);
            return;
         }
      }
      boolean activated = layer != null && layer.activated;
      if (!getTypeClassName().equals(newType.getTypeClassName())) {
         displayError("Invalid updateType - expected type: " + typeName + " but found: " + newType.typeName + " for: ");
         return;
      }
      UpdateTypeCtx tctx = buildUpdateTypeContext(newType, updateMode, info, activated);
      updateTypeInternals(tctx, newType, ctx, updateMode, updateInstances, info, true);
      if (activated && updateMode != TypeUpdateMode.Remove && info == null)
         ParseUtil.realInitAndStartComponent(newType);
      completeUpdateType(tctx, newType, ctx, updateMode, updateInstances, info, true, activated);
   }
public void updateType ( BodyTypeDeclaration newType , ExecutionContext ctx , TypeUpdateMode updateMode , boolean updateInstances , UpdateInstanceInfo info ) { if ( info == null && updateInstances ) System . out . println ( "*** Error - no update instance info and updating instances" ) ; if ( typeName == null || newType . typeName == null ) { displayError ( "updateType - skipping update for type with no name." ) ; return ; } if ( updateMode == TypeUpdateMode . Remove && this instanceof ModifyDeclaration ) { ModifyDeclaration modThis = ( ModifyDeclaration ) this ; BodyTypeDeclaration nextToRemove = modThis . getModifiedType ( ) ; if ( nextToRemove != newType ) { nextToRemove . updateType ( newType , ctx , updateMode , updateInstances , info ) ; modThis . updateExtendsType ( newType , true , false ) ; updateType ( newType , ctx , updateMode , updateInstances , info ) ; return ; } } boolean activated = layer != null && layer . activated ; if ( ! getTypeClassName ( ) . equals ( newType . getTypeClassName ( ) ) ) { displayError ( "Invalid updateType - expected type: " + typeName + " but found: " + newType . typeName + " for: " ) ; return ; } UpdateTypeCtx tctx = buildUpdateTypeContext ( newType , updateMode , info , activated ) ; updateTypeInternals ( tctx , newType , ctx , updateMode , updateInstances , info , true ) ; if ( activated && updateMode != TypeUpdateMode . Remove && info == null ) ParseUtil . realInitAndStartComponent ( newType ) ; completeUpdateType ( tctx , newType , ctx , updateMode , updateInstances , info , true , activated ) ; }
Updates this type with the new type.
Updates this type with the new type .
// Are we removing a type layer?  If so we first modify the previous type, then remove this type // Need to unpeel the onion, so we remove the earliest type first, then the later ones.  TODO: possibly move this out one level to updateModel? // Start the type after it's fully registered into the new type system so any new references we create point // to the new model.  If we are batching updates do not start the type here.  We may be updating many types and // if we start it here, we'll resolve references to other types that will become stale.