manipulate document within Swing thread only -- potentially slow;
authorwenzelm
Tue Dec 08 12:10:55 2009 +0100 (2009-12-08)
changeset 34757adf4e0f27d54
parent 34756 c4818d907ca0
child 34758 710e3a9a4c95
manipulate document within Swing thread only -- potentially slow;
src/Tools/jEdit/src/jedit/StateViewDockable.scala
     1.1 --- a/src/Tools/jEdit/src/jedit/StateViewDockable.scala	Tue Dec 08 12:09:17 2009 +0100
     1.2 +++ b/src/Tools/jEdit/src/jedit/StateViewDockable.scala	Tue Dec 08 12:10:55 2009 +0100
     1.3 @@ -94,15 +94,15 @@
     1.4    Isabelle.plugin.state_update += (cmd => {
     1.5      val theory_view = Isabelle.prover_setup(view.getBuffer).get.theory_view
     1.6  
     1.7 -    val node =
     1.8 -      if (cmd == null) empty_body
     1.9 -      else {
    1.10 -        val xml = XML.elem(HTML.BODY,
    1.11 -          cmd.results(theory_view.current_document).
    1.12 -            map((t: XML.Tree) => XML.elem(HTML.PRE, HTML.spans(t))))
    1.13 -        XML.document_node(doc, xml)
    1.14 -      }
    1.15      Swing_Thread.later {
    1.16 +      val node =
    1.17 +        if (cmd == null) empty_body
    1.18 +        else {
    1.19 +          val xml = XML.elem(HTML.BODY,
    1.20 +            cmd.results(theory_view.current_document).
    1.21 +              map((t: XML.Tree) => XML.elem(HTML.PRE, HTML.spans(t))))
    1.22 +          XML.document_node(doc, xml)
    1.23 +        }
    1.24        doc.removeChild(doc.getLastChild())
    1.25        doc.appendChild(node)
    1.26        panel.delayedRelayout(node.asInstanceOf[NodeImpl])