src/Tools/jEdit/src/jedit/browse_version_dockable.scala
changeset 34760 dc7f5e0d9d27
parent 34759 bfea7839d9e1
child 34761 0ad6d8372f9d
     1.1 --- a/src/Tools/jEdit/src/jedit/browse_version_dockable.scala	Tue Dec 08 14:49:01 2009 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,43 +0,0 @@
     1.4 -/*
     1.5 - * Dockable window for navigating through the document-versions
     1.6 - *
     1.7 - * @author Fabian Immler, TU Munich
     1.8 - */
     1.9 -
    1.10 -package isabelle.jedit
    1.11 -
    1.12 -import isabelle.proofdocument.Change
    1.13 -
    1.14 -import java.awt.Dimension
    1.15 -import scala.swing.{ListView, FlowPanel}
    1.16 -import scala.swing.event.ListSelectionChanged
    1.17 -
    1.18 -import org.gjt.sp.jedit.View
    1.19 -import org.gjt.sp.jedit.gui.DockableWindowManager
    1.20 -
    1.21 -
    1.22 -class BrowseVersionDockable(view: View, position: String) extends FlowPanel
    1.23 -{
    1.24 -  if (position == DockableWindowManager.FLOATING)
    1.25 -    preferredSize = new Dimension(500, 250)
    1.26 -
    1.27 -  def prover_setup(): Option[ProverSetup] = Isabelle.prover_setup(view.getBuffer)
    1.28 -  def get_versions() =
    1.29 -    prover_setup() match {
    1.30 -      case None => Nil
    1.31 -      case Some(setup) => setup.theory_view.changes
    1.32 -    }
    1.33 -
    1.34 -  val list = new ListView[Change]
    1.35 -  list.fixedCellWidth = 500
    1.36 -  list.listData = get_versions()
    1.37 -  contents += list
    1.38 -
    1.39 -  listenTo(list.selection)
    1.40 -  reactions += {
    1.41 -    case ListSelectionChanged(source, range, false) =>
    1.42 -        prover_setup().map(_.theory_view.set_version(list.listData(range.start)))
    1.43 -    }
    1.44 -
    1.45 -  prover_setup.foreach(_.prover.document_change += (_ => list.listData = get_versions()))
    1.46 -}