src/Tools/VSCode/src/preview_panel.scala
changeset 75884 3d8b37b1d798
parent 75728 3f64fdf75082
child 75897 989847d1ebab
equal deleted inserted replaced
75871:648fe09330f3 75884:3d8b37b1d798
    26             resources.get_model(file) match {
    26             resources.get_model(file) match {
    27               case Some(model) =>
    27               case Some(model) =>
    28                 val snapshot = model.snapshot()
    28                 val snapshot = model.snapshot()
    29                 if (snapshot.is_outdated) m
    29                 if (snapshot.is_outdated) m
    30                 else {
    30                 else {
    31                   val html_context =
    31                   val html_context = Presentation.html_context(resources.sessions_structure)
    32                     new Presentation.HTML_Context {
       
    33                       override def nodes: Presentation.Nodes = Presentation.Nodes.empty
       
    34                       override def root_dir: Path = Path.current
       
    35                       override def theory_session(name: Document.Node.Name): Sessions.Info =
       
    36                         resources.sessions_structure(resources.session_base.theory_qualifier(name))
       
    37                     }
       
    38                   val document =
    32                   val document =
    39                     Presentation.html_document(snapshot, html_context, Presentation.elements2)
    33                     Presentation.html_document(snapshot, html_context, Presentation.elements2)
    40                   channel.write(LSP.Preview_Response(file, column, document.title, document.content))
    34                   channel.write(LSP.Preview_Response(file, column, document.title, document.content))
    41                   m - file
    35                   m - file
    42                 }
    36                 }