src/Tools/jEdit/src/jedit/Plugin.scala
changeset 34440 561a6d19bd95
parent 34433 3da749b53842
child 34441 ff3b7ae2b12a
--- a/src/Tools/jEdit/src/jedit/Plugin.scala	Sat Dec 27 12:29:15 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/Plugin.scala	Sat Dec 27 14:13:05 2008 +0100
@@ -24,7 +24,7 @@
 import org.gjt.sp.jedit.msg.{EditPaneUpdate, PropertiesChanged}
 
 
-object Plugin {
+object Isabelle {
   // name
   val NAME = "Isabelle"
   val OPTION_PREFIX = "options.isabelle."
@@ -35,21 +35,22 @@
   def property(name: String, value: String) = 
     jEdit.setProperty(OPTION_PREFIX + name, value)
 
-  // dynamic instance
-  var self: Plugin = null
+
+  // Isabelle symbols
+  var symbols: Symbol.Interpretation = null
+
+
+  // plugin instance
+  var plugin: Plugin = null
 
   // provers
-  def prover(buffer: JEditBuffer) = self.prover_setup(buffer).get.prover
-  def prover_setup(buffer: JEditBuffer) = self.prover_setup(buffer).get
+  def prover(buffer: JEditBuffer) = plugin.prover_setup(buffer).get.prover
+  def prover_setup(buffer: JEditBuffer) = plugin.prover_setup(buffer).get
 }
 
 
 class Plugin extends EBPlugin {
 
-  // Isabelle symbols
-  val symbols = new Symbol.Interpretation
-
-
   // Isabelle font
 
   var font: Font = null
@@ -129,11 +130,12 @@
   }
 
   override def start() {
-    Plugin.self = this
+    Isabelle.symbols = new Symbol.Interpretation
+    Isabelle.plugin = this
     
-    if (Plugin.property("font-path") != null && Plugin.property("font-size") != null)
+    if (Isabelle.property("font-path") != null && Isabelle.property("font-size") != null)
       try {
-        set_font(Plugin.property("font-path"), Plugin.property("font-size").toFloat)
+        set_font(Isabelle.property("font-path"), Isabelle.property("font-size").toFloat)
       }
       catch {
         case e: NumberFormatException =>
@@ -142,6 +144,7 @@
   
   override def stop() {
     // TODO: proper cleanup
-    Plugin.self = null
+    Isabelle.plugin = null
+    Isabelle.symbols = null
   }
 }