system/src/sc/lang/java/ModelStream.java
public void updateRuntime(String destName, String defaultScope, boolean applyRemoteReset) {
      syncCtx = SyncManager.getSyncContext(destName, defaultScope, true);
      if (syncCtx == null) {
         throw new IllegalArgumentException("Failed to find a sync context for destination: " + destName + " scope: " + defaultScope);
      }

      // TODO: maybe we should have a current sync context rather than the set of layers?   Basically because we are code-generating the
      // call to processMethodReturn, we need to pass this syncCtx into that call so doing it with a thread-local
      SyncManager.setCurrentSyncLayers(syncCtx.getChangedSyncLayers(null));
      try {

         ParseUtil.initAndStartComponent(this);

         for (JavaModel model:modelList) {
            if (model.hasErrors()) {
               System.err.println("*** Failed to update runtime for modelStream due to errors in the model");
            }
         }
         for (JavaModel model:modelList)
            model.updateRuntimeModel(syncCtx, bindCtx);
      }
      finally {
         SyncManager.setCurrentSyncLayers(null);
      }
   }
/** This is called to apply the model stream to the system using the supplied default scope. */
This is called to apply the model stream to the system using the supplied default scope.
This is called to apply the model stream to the system using the supplied default scope .
public void updateRuntime(String destName, String defaultScope, boolean applyRemoteReset) {
      syncCtx = SyncManager.getSyncContext(destName, defaultScope, true);
      if (syncCtx == null) {
         throw new IllegalArgumentException("Failed to find a sync context for destination: " + destName + " scope: " + defaultScope);
      }
      SyncManager.setCurrentSyncLayers(syncCtx.getChangedSyncLayers(null));
      try {
         ParseUtil.initAndStartComponent(this);
         for (JavaModel model:modelList) {
            if (model.hasErrors()) {
               System.err.println("*** Failed to update runtime for modelStream due to errors in the model");
            }
         }
         for (JavaModel model:modelList)
            model.updateRuntimeModel(syncCtx, bindCtx);
      }
      finally {
         SyncManager.setCurrentSyncLayers(null);
      }
   }
public void updateRuntime ( String destName , String defaultScope , boolean applyRemoteReset ) { syncCtx = SyncManager . getSyncContext ( destName , defaultScope , true ) ; if ( syncCtx == null ) { throw new IllegalArgumentException ( "Failed to find a sync context for destination: " + destName + " scope: " + defaultScope ) ; } SyncManager . setCurrentSyncLayers ( syncCtx . getChangedSyncLayers ( null ) ) ; try { ParseUtil . initAndStartComponent ( this ) ; for ( JavaModel model : modelList ) { if ( model . hasErrors ( ) ) { System . err . println ( "*** Failed to update runtime for modelStream due to errors in the model" ) ; } } for ( JavaModel model : modelList ) model . updateRuntimeModel ( syncCtx , bindCtx ) ; } finally { SyncManager . setCurrentSyncLayers ( null ) ; } }
This is called to apply the model stream to the system using the supplied default scope.
This is called to apply the model stream to the system using the supplied default scope .
// TODO: maybe we should have a current sync context rather than the set of layers?   Basically because we are code-generating the // call to processMethodReturn, we need to pass this syncCtx into that call so doing it with a thread-local