author | wenzelm |
Tue, 08 Dec 2009 20:14:08 +0100 | |
changeset 34765 | 63ba7f0931e2 |
parent 34760 | dc7f5e0d9d27 |
child 34768 | d8d321af1478 |
permissions | -rw-r--r-- |
34408 | 1 |
/* |
34765 | 2 |
* Dockable window with result message output |
34408 | 3 |
* |
34765 | 4 |
* @author Makarius |
34408 | 5 |
*/ |
6 |
||
34318
c13e168a8ae6
original sources from Johannes Hölzl a48e0c6ab1aea77c52d596f7efc007a543d3d10c with minor modifications of directory layout;
wenzelm
parents:
diff
changeset
|
7 |
package isabelle.jedit |
c13e168a8ae6
original sources from Johannes Hölzl a48e0c6ab1aea77c52d596f7efc007a543d3d10c with minor modifications of directory layout;
wenzelm
parents:
diff
changeset
|
8 |
|
34760 | 9 |
|
34765 | 10 |
import isabelle.proofdocument.HTML_Panel |
34318
c13e168a8ae6
original sources from Johannes Hölzl a48e0c6ab1aea77c52d596f7efc007a543d3d10c with minor modifications of directory layout;
wenzelm
parents:
diff
changeset
|
11 |
|
34765 | 12 |
import scala.io.Source |
34760 | 13 |
import scala.swing.{BorderPanel, Component} |
14 |
||
34765 | 15 |
import java.awt.Dimension |
34748 | 16 |
|
34318
c13e168a8ae6
original sources from Johannes Hölzl a48e0c6ab1aea77c52d596f7efc007a543d3d10c with minor modifications of directory layout;
wenzelm
parents:
diff
changeset
|
17 |
import org.gjt.sp.jedit.View |
34424 | 18 |
import org.gjt.sp.jedit.gui.DockableWindowManager |
34745 | 19 |
|
34318
c13e168a8ae6
original sources from Johannes Hölzl a48e0c6ab1aea77c52d596f7efc007a543d3d10c with minor modifications of directory layout;
wenzelm
parents:
diff
changeset
|
20 |
|
34765 | 21 |
|
22 |
class Results_Dockable(view: View, position: String) extends BorderPanel |
|
34760 | 23 |
{ |
34428
d69fd18f37f9
basic setup of anti-aliasing, according to jEdit property;
wenzelm
parents:
34424
diff
changeset
|
24 |
// outer panel |
34760 | 25 |
|
34424 | 26 |
if (position == DockableWindowManager.FLOATING) |
34760 | 27 |
preferredSize = new Dimension(500, 250) |
34406
f81cd75ae331
restructured: independent provers in different buffers
immler@in.tum.de
parents:
34397
diff
changeset
|
28 |
|
34748 | 29 |
|
34745 | 30 |
// HTML panel |
31 |
||
34765 | 32 |
val html_panel = new HTML_Panel(Isabelle.system, Isabelle.Int_Property("font-size")) |
33 |
add(Component.wrap(html_panel), BorderPanel.Position.Center) |
|
34428
d69fd18f37f9
basic setup of anti-aliasing, according to jEdit property;
wenzelm
parents:
34424
diff
changeset
|
34 |
|
34669 | 35 |
Isabelle.plugin.state_update += (cmd => { |
36 |
val theory_view = Isabelle.prover_setup(view.getBuffer).get.theory_view |
|
34765 | 37 |
val body = |
38 |
if (cmd == null) Nil // FIXME ?? |
|
39 |
else cmd.results(theory_view.current_document) |
|
40 |
html_panel.render(body) |
|
34669 | 41 |
}) |
34318
c13e168a8ae6
original sources from Johannes Hölzl a48e0c6ab1aea77c52d596f7efc007a543d3d10c with minor modifications of directory layout;
wenzelm
parents:
diff
changeset
|
42 |
} |