access statically typed dockable windows;
authorwenzelm
Sat May 22 22:30:37 2010 +0200 (2010-05-22)
changeset 3706807936a4efe93
parent 37067 31093f3687b5
child 37069 7d796b72099f
access statically typed dockable windows;
src/Tools/jEdit/src/jedit/plugin.scala
     1.1 --- a/src/Tools/jEdit/src/jedit/plugin.scala	Sat May 22 22:05:41 2010 +0200
     1.2 +++ b/src/Tools/jEdit/src/jedit/plugin.scala	Sat May 22 22:30:37 2010 +0200
     1.3 @@ -21,6 +21,7 @@
     1.4  import org.gjt.sp.jedit.buffer.JEditBuffer
     1.5  import org.gjt.sp.jedit.textarea.JEditTextArea
     1.6  import org.gjt.sp.jedit.msg.{EditPaneUpdate, PropertiesChanged}
     1.7 +import org.gjt.sp.jedit.gui.DockableWindowManager
     1.8  
     1.9  
    1.10  object Isabelle
    1.11 @@ -112,6 +113,29 @@
    1.12      jedit_text_areas().filter(_.getBuffer == buffer)
    1.13  
    1.14  
    1.15 +  /* dockable windows */
    1.16 +
    1.17 +  private def wm(view: View): DockableWindowManager = view.getDockableWindowManager
    1.18 +
    1.19 +  def docked_output(view: View): Option[Output_Dockable] =
    1.20 +    wm(view).getDockableWindow("isabelle-output") match {
    1.21 +      case dockable: Output_Dockable => Some(dockable)
    1.22 +      case _ => None
    1.23 +    }
    1.24 +
    1.25 +  def docked_raw_output(view: View): Option[Raw_Output_Dockable] =
    1.26 +    wm(view).getDockableWindow("isabelle-raw-output") match {
    1.27 +      case dockable: Raw_Output_Dockable => Some(dockable)
    1.28 +      case _ => None
    1.29 +    }
    1.30 +
    1.31 +  def docked_protocol(view: View): Option[Protocol_Dockable] =
    1.32 +    wm(view).getDockableWindow("isabelle-protocol") match {
    1.33 +      case dockable: Protocol_Dockable => Some(dockable)
    1.34 +      case _ => None
    1.35 +    }
    1.36 +
    1.37 +
    1.38    /* manage prover */
    1.39  
    1.40    private def prover_started(view: View): Boolean =