system/src/sc/lang/java/ModelUtil.java
public static boolean isSyncEnabled(Object type) {
      if (type instanceof BodyTypeDeclaration) {
         BodyTypeDeclaration typeDecl = (BodyTypeDeclaration) type;
         if (typeDecl.getInheritedSyncProperties() != null)
            return true;
         // Because type is defined on the client, it may not have sync properties but still be synchronized
         // on the server.  To include "ServerToClient" mode, need to check the annotation and see if it's disabled.
         // Erring on the side of having sync enabled since this is for the type filter.
         SyncMode syncMode = BodyTypeDeclaration.getInheritedSyncMode(typeDecl.getLayeredSystem(), typeDecl);
         if (syncMode != null && syncMode != SyncMode.Disabled)
            return true;
      }
      String typeName = ModelUtil.getTypeName(type);
      // TODO: is this needed anymore? We now use the SyncTypeFilter annotation instead of global type names
      if (SyncManager.globalSyncTypeNames == null)
         return false;
      return SyncManager.globalSyncTypeNames.contains(typeName);
   }
/**
    * For compile time access to whether or not we are dealing with a synchronize type.  TODO:
    * calls to 'addSyncType' are not reflected here which breaks the syncTypeFilter.  For now, we're leaving
    * the syncTypeFilter in as a system option to workaround this problem.  But you can update globalSyncTypes
    * to include other types as synchronized for when you need the syncTypeFilter.
    */
For compile time access to whether or not we are dealing with a synchronize type.  TODO:
calls to 'addSyncType' are not reflected here which breaks the syncTypeFilter.  For now, we're leaving
the syncTypeFilter in as a system option to workaround this problem.  But you can update globalSyncTypes
to include other types as synchronized for when you need the syncTypeFilter.
For compile time access to whether or not we are dealing with a synchronize type . TODO : calls to ' addSyncType ' are not reflected here which breaks the syncTypeFilter . For now we ' re leaving the syncTypeFilter in as a system option to workaround this problem . But you can update globalSyncTypes to include other types as synchronized for when you need the syncTypeFilter .
public static boolean isSyncEnabled(Object type) {
      if (type instanceof BodyTypeDeclaration) {
         BodyTypeDeclaration typeDecl = (BodyTypeDeclaration) type;
         if (typeDecl.getInheritedSyncProperties() != null)
            return true;
         SyncMode syncMode = BodyTypeDeclaration.getInheritedSyncMode(typeDecl.getLayeredSystem(), typeDecl);
         if (syncMode != null && syncMode != SyncMode.Disabled)
            return true;
      }
      String typeName = ModelUtil.getTypeName(type);
      if (SyncManager.globalSyncTypeNames == null)
         return false;
      return SyncManager.globalSyncTypeNames.contains(typeName);
   }
public static boolean isSyncEnabled ( Object type ) { if ( type instanceof BodyTypeDeclaration ) { BodyTypeDeclaration typeDecl = ( BodyTypeDeclaration ) type ; if ( typeDecl . getInheritedSyncProperties ( ) != null ) return true ; SyncMode syncMode = BodyTypeDeclaration . getInheritedSyncMode ( typeDecl . getLayeredSystem ( ) , typeDecl ) ; if ( syncMode != null && syncMode != SyncMode . Disabled ) return true ; } String typeName = ModelUtil . getTypeName ( type ) ; if ( SyncManager . globalSyncTypeNames == null ) return false ; return SyncManager . globalSyncTypeNames . contains ( typeName ) ; }
For compile time access to whether or not we are dealing with a synchronize type.
For compile time access to whether or not we are dealing with a synchronize type .
// Because type is defined on the client, it may not have sync properties but still be synchronized // on the server.  To include "ServerToClient" mode, need to check the annotation and see if it's disabled. // Erring on the side of having sync enabled since this is for the type filter. // TODO: is this needed anymore? We now use the SyncTypeFilter annotation instead of global type names