src/Pure/Thy/presentation.scala
changeset 75394 42267c650205
parent 75393 87ebf5a50283
child 75720 8fde337b3dfb
equal deleted inserted replaced
75393:87ebf5a50283 75394:42267c650205
   578     var seen_files = List.empty[Seen_File]
   578     var seen_files = List.empty[Seen_File]
   579 
   579 
   580     def present_theory(name: Document.Node.Name): Option[XML.Body] = {
   580     def present_theory(name: Document.Node.Name): Option[XML.Body] = {
   581       progress.expose_interrupt()
   581       progress.expose_interrupt()
   582 
   582 
   583       Build_Job.read_theory(db_context, hierarchy, name.theory).flatMap(command => {
   583       Build_Job.read_theory(db_context, hierarchy, name.theory).flatMap { command =>
   584         if (verbose) progress.echo("Presenting theory " + name)
   584         if (verbose) progress.echo("Presenting theory " + name)
   585         val snapshot = Document.State.init.snippet(command)
   585         val snapshot = Document.State.init.snippet(command)
   586 
   586 
   587         val thy_elements =
   587         val thy_elements =
   588           session_elements.copy(entity =
   588           session_elements.copy(entity =
   639             List(HTML.link(html_name(name),
   639             List(HTML.link(html_name(name),
   640               HTML.text(name.theory_base_name) :::
   640               HTML.text(name.theory_base_name) :::
   641                 (if (files.isEmpty) Nil else List(HTML.itemize(files))))))
   641                 (if (files.isEmpty) Nil else List(HTML.itemize(files))))))
   642         }
   642         }
   643         else None
   643         else None
   644       })
   644       }
   645     }
   645     }
   646 
   646 
   647     val theories = base.session_theories.flatMap(present_theory)
   647     val theories = base.session_theories.flatMap(present_theory)
   648 
   648 
   649     val title = "Session " + session
   649     val title = "Session " + session