system/src/sc/layer/LayeredSystem.java
public boolean initTypeIndex() {
      typeIndexEnabled = true;
      if (peerSystems != null) {
         for (LayeredSystem peerSys:peerSystems)
            peerSys.typeIndexEnabled = true;
      }

      typeIndexProcessedLayers.clear();

      if (!loadTypeIndex(typeIndexProcessedLayers))
         return false;

      RefreshIndexStatus indexStat = refreshTypeIndex(typeIndexProcessedLayers);
      if (indexStat == RefreshIndexStatus.Completed) {
         buildReverseTypeIndex(false);

         saveTypeIndexFiles();
      }
      if (indexStat != RefreshIndexStatus.Incomplete)
         typeIndexLoaded = true;
      else
         return false;

      // TODO: after we rebuild the type index from scratch (at least) it's nice if we go through and cull out unused types
      // to save memory.  But need to test this again after after updating the code to handle modified types
      // previously the modified types were not reconciled and therefore updated when a new inactive layer was loaded
      // - this is a tricky case cause we need to update the modify chain or else references are not updated properly to point to the inserted type.
      //cleanInactiveCache();
      return true;
   }
/** This is called on the main layered system.  It will enable the type index on all peer systems.  */
This is called on the main layered system.  It will enable the type index on all peer systems.
This is called on the main layered system . It will enable the type index on all peer systems .
public boolean initTypeIndex() {
      typeIndexEnabled = true;
      if (peerSystems != null) {
         for (LayeredSystem peerSys:peerSystems)
            peerSys.typeIndexEnabled = true;
      }
      typeIndexProcessedLayers.clear();
      if (!loadTypeIndex(typeIndexProcessedLayers))
         return false;
      RefreshIndexStatus indexStat = refreshTypeIndex(typeIndexProcessedLayers);
      if (indexStat == RefreshIndexStatus.Completed) {
         buildReverseTypeIndex(false);
         saveTypeIndexFiles();
      }
      if (indexStat != RefreshIndexStatus.Incomplete)
         typeIndexLoaded = true;
      else
         return false;
      return true;
   }
public boolean initTypeIndex ( ) { typeIndexEnabled = true ; if ( peerSystems != null ) { for ( LayeredSystem peerSys : peerSystems ) peerSys . typeIndexEnabled = true ; } typeIndexProcessedLayers . clear ( ) ; if ( ! loadTypeIndex ( typeIndexProcessedLayers ) ) return false ; RefreshIndexStatus indexStat = refreshTypeIndex ( typeIndexProcessedLayers ) ; if ( indexStat == RefreshIndexStatus . Completed ) { buildReverseTypeIndex ( false ) ; saveTypeIndexFiles ( ) ; } if ( indexStat != RefreshIndexStatus . Incomplete ) typeIndexLoaded = true ; else return false ; return true ; }
This is called on the main layered system.
This is called on the main layered system .
// TODO: after we rebuild the type index from scratch (at least) it's nice if we go through and cull out unused types // to save memory.  But need to test this again after after updating the code to handle modified types // previously the modified types were not reconciled and therefore updated when a new inactive layer was loaded // - this is a tricky case cause we need to update the modify chain or else references are not updated properly to point to the inserted type. //cleanInactiveCache();