system/src/sc/layer/LayeredSystem.java
void removeFromPackageIndex(String rootDir, Layer layer, boolean isZip, boolean isSrc, String relDir, String fileName) {
      fileName = FileUtil.removeExtension(fileName);

      HashMap<String,PackageEntry> packageEntry = packageIndex.get(relDir);
      if (packageEntry == null) {
         System.err.println("*** Cannot find package dir entry in remove");
         return;
      }
      PackageEntry curEnt = packageEntry.get(fileName);
      if (curEnt == null) {
         System.err.println("*** Cannot find package entry to remove: " + fileName);
         return;
      }
      if (curEnt.prev == null)
         packageEntry.remove(fileName);
      else
         packageEntry.put(fileName, curEnt.prev);
   }
/** Note: removes the last package entry added - for the case where add a new model, find that it's file does not exist, then remove it right away.  If someone adds another entry for the same file name we may not remove the right one. */
removes the last package entry added - for the case where add a new model, find that it's file does not exist, then remove it right away.  If someone adds another entry for the same file name we may not remove the right one.
removes the last package entry added - for the case where add a new model find that it ' s file does not exist then remove it right away . If someone adds another entry for the same file name we may not remove the right one .
void removeFromPackageIndex(String rootDir, Layer layer, boolean isZip, boolean isSrc, String relDir, String fileName) {
      fileName = FileUtil.removeExtension(fileName);
      HashMap<String,PackageEntry> packageEntry = packageIndex.get(relDir);
      if (packageEntry == null) {
         System.err.println("*** Cannot find package dir entry in remove");
         return;
      }
      PackageEntry curEnt = packageEntry.get(fileName);
      if (curEnt == null) {
         System.err.println("*** Cannot find package entry to remove: " + fileName);
         return;
      }
      if (curEnt.prev == null)
         packageEntry.remove(fileName);
      else
         packageEntry.put(fileName, curEnt.prev);
   }
void removeFromPackageIndex ( String rootDir , Layer layer , boolean isZip , boolean isSrc , String relDir , String fileName ) { fileName = FileUtil . removeExtension ( fileName ) ; HashMap < String , PackageEntry > packageEntry = packageIndex . get ( relDir ) ; if ( packageEntry == null ) { System . err . println ( "*** Cannot find package dir entry in remove" ) ; return ; } PackageEntry curEnt = packageEntry . get ( fileName ) ; if ( curEnt == null ) { System . err . println ( "*** Cannot find package entry to remove: " + fileName ) ; return ; } if ( curEnt . prev == null ) packageEntry . remove ( fileName ) ; else packageEntry . put ( fileName , curEnt . prev ) ; }
Note: removes the last package entry added - for the case where add a new model, find that it's file does not exist, then remove it right away.
Note : removes the last package entry added - for the case where add a new model find that it ' s file does not exist then remove it right away .