src/Pure/Thy/thy_resources.scala
changeset 68958 9199f9da512a
parent 68957 eef4e983fd9d
child 68959 d4223afddd47
equal deleted inserted replaced
68957:eef4e983fd9d 68958:9199f9da512a
   450     session: Session,
   450     session: Session,
   451     id: UUID,
   451     id: UUID,
   452     dep_theories: List[Document.Node.Name],
   452     dep_theories: List[Document.Node.Name],
   453     progress: Progress)
   453     progress: Progress)
   454   {
   454   {
   455 
       
   456     val loaded_theories =
   455     val loaded_theories =
   457       for (node_name <- dep_theories)
   456       for (node_name <- dep_theories)
   458       yield {
   457       yield {
   459         val path = node_name.path
   458         val path = node_name.path
   460         if (!node_name.is_theory) error("Not a theory file: " + path)
   459         if (!node_name.is_theory) error("Not a theory file: " + path)
   462         progress.expose_interrupt()
   461         progress.expose_interrupt()
   463         val text = File.read(path)
   462         val text = File.read(path)
   464         val node_header = resources.check_thy_reader(node_name, Scan.char_reader(text))
   463         val node_header = resources.check_thy_reader(node_name, Scan.char_reader(text))
   465         new Thy_Resources.Theory(node_name, node_header, text, true)
   464         new Thy_Resources.Theory(node_name, node_header, text, true)
   466       }
   465       }
       
   466 
       
   467     val loaded = loaded_theories.length
       
   468     if (loaded > 1) progress.echo("Loading " + loaded + " theories ...")
   467 
   469 
   468     state.change(st =>
   470     state.change(st =>
   469       {
   471       {
   470         val st1 = st.insert_required(id, dep_theories)
   472         val st1 = st.insert_required(id, dep_theories)
   471         val theory_edits =
   473         val theory_edits =