replaced static IsabelleSystem by Isabelle.system;
authorwenzelm
Sat, 27 Dec 2008 15:03:32 +0100
changeset 34441 ff3b7ae2b12a
parent 34440 561a6d19bd95
child 34442 9e6d80c387e0
replaced static IsabelleSystem by Isabelle.system;
src/Tools/jEdit/src/jedit/OptionPane.scala
src/Tools/jEdit/src/jedit/Plugin.scala
src/Tools/jEdit/src/jedit/ProverSetup.scala
src/Tools/jEdit/src/jedit/StateViewDockable.scala
src/Tools/jEdit/src/jedit/VFS.scala
--- a/src/Tools/jEdit/src/jedit/OptionPane.scala	Sat Dec 27 14:13:05 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/OptionPane.scala	Sat Dec 27 15:03:32 2008 +0100
@@ -15,8 +15,6 @@
 import javax.swing.{ JTextField, JButton, JPanel, JLabel, JFileChooser, 
                      JSpinner, SwingUtilities, JComboBox }
 
-import isabelle.IsabelleSystem
-
 import org.gjt.sp.jedit.AbstractOptionPane
 
 class OptionPane extends AbstractOptionPane("isabelle") {
@@ -59,7 +57,7 @@
     })
 
     addComponent(property("logic.title"), {
-      for (name <- IsabelleSystem.find_logics()) {
+      for (name <- Isabelle.system.find_logics()) {
         logicName.addItem(name)
         if (name == property("logic"))
           logicName.setSelectedItem(name)
--- a/src/Tools/jEdit/src/jedit/Plugin.scala	Sat Dec 27 14:13:05 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/Plugin.scala	Sat Dec 27 15:03:32 2008 +0100
@@ -36,7 +36,8 @@
     jEdit.setProperty(OPTION_PREFIX + name, value)
 
 
-  // Isabelle symbols
+  // Isabelle system
+  var system: IsabelleSystem = null
   var symbols: Symbol.Interpretation = null
 
 
@@ -130,7 +131,8 @@
   }
 
   override def start() {
-    Isabelle.symbols = new Symbol.Interpretation
+    Isabelle.system = new IsabelleSystem
+    Isabelle.symbols = new Symbol.Interpretation(system)
     Isabelle.plugin = this
     
     if (Isabelle.property("font-path") != null && Isabelle.property("font-size") != null)
@@ -144,7 +146,8 @@
   
   override def stop() {
     // TODO: proper cleanup
+    Isabelle.symbols = null
+    Isabelle.system = null
     Isabelle.plugin = null
-    Isabelle.symbols = null
   }
 }
--- a/src/Tools/jEdit/src/jedit/ProverSetup.scala	Sat Dec 27 14:13:05 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/ProverSetup.scala	Sat Dec 27 15:03:32 2008 +0100
@@ -7,7 +7,6 @@
 package isabelle.jedit
 
 
-import isabelle.IsabelleSystem
 import isabelle.utils.EventSource
 import isabelle.prover.{Prover, Command}
 import isabelle.renderer.UserAgent
--- a/src/Tools/jEdit/src/jedit/StateViewDockable.scala	Sat Dec 27 14:13:05 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/StateViewDockable.scala	Sat Dec 27 15:03:32 2008 +0100
@@ -11,7 +11,6 @@
 import java.awt.{BorderLayout, Dimension}
 import javax.swing.{JButton, JPanel, JScrollPane}
 
-import isabelle.IsabelleSystem.getenv
 import isabelle.renderer.UserAgent
 
 import org.xhtmlrenderer.simple.{XHTMLPanel, FSScrollPane}
--- a/src/Tools/jEdit/src/jedit/VFS.scala	Sat Dec 27 14:13:05 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/VFS.scala	Sat Dec 27 15:03:32 2008 +0100
@@ -24,8 +24,8 @@
 object VFS {  
   val BUFFER_SIZE = 1024
   
-  def input_converter(in: InputStream) = {
-    val reader = new InputStreamReader(in, IsabelleSystem.charset)
+  def input_converter(isabelle_system: IsabelleSystem, in: InputStream) = {
+    val reader = new InputStreamReader(in, Isabelle.system.charset)
     val buffer = new StringBuilder
     val array = new Array[Char](BUFFER_SIZE)
     
@@ -39,7 +39,7 @@
     }
 
     val str = Isabelle.symbols.decode(buffer.toString)
-    new ByteArrayInputStream(str.getBytes(IsabelleSystem.charset))
+    new ByteArrayInputStream(str.getBytes(isabelle_system.charset))
   }
   
   class OutputConverter(out: OutputStream) extends ByteArrayOutputStream {