renamed Plugin.plugin to Plugin.self;
authorwenzelm
Sun, 21 Dec 2008 21:43:41 +0100
changeset 34434 ba08fc74f98a
parent 34433 3da749b53842
child 34435 926272164bff
renamed Plugin.plugin to Plugin.self; tuned Plugin.font handling;
src/Tools/jEdit/src/jedit/ScrollerDockable.scala
src/Tools/jEdit/src/jedit/StateViewDockable.scala
src/Tools/jEdit/src/jedit/TheoryView.scala
--- a/src/Tools/jEdit/src/jedit/ScrollerDockable.scala	Sun Dec 21 21:43:41 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/ScrollerDockable.scala	Sun Dec 21 21:43:41 2008 +0100
@@ -173,7 +173,7 @@
 
   
   // TODO: register
-  //Plugin.plugin.prover.allInfo.add(add_result(_))
+  //Plugin.self.prover.allInfo.add(add_result(_))
 }
 
 //Concrete Implementations
@@ -220,15 +220,15 @@
     val panel = new XHTMLPanel(new UserAgent())
     val fontResolver =
       panel.getSharedContext.getFontResolver.asInstanceOf[AWTFontResolver]
-    if (Plugin.plugin.viewFont != null)
-      fontResolver.setFontMapping("Isabelle", Plugin.plugin.viewFont)
+    if (Plugin.self.font != null)
+      fontResolver.setFontMapping("Isabelle", Plugin.self.font)
 
-    Plugin.plugin.viewFontChanged.add(font => {
-      if (Plugin.plugin.viewFont != null)
-        fontResolver.setFontMapping("Isabelle", Plugin.plugin.viewFont)
+    Plugin.self.font_changed.add(font => {
+      if (Plugin.self.font != null)
+        fontResolver.setFontMapping("Isabelle", Plugin.self.font)
       panel.relayout()
     })
-    val tree = parse_failsafe(VFS.converter.decode(r.result))
+    val tree = parse_failsafe(Plugin.self.symbols.decode(r.result))
     val document = XML.document(tree)
     panel.setDocument(document, UserAgent.baseURL)
     val sa = new SelectionActions
--- a/src/Tools/jEdit/src/jedit/StateViewDockable.scala	Sun Dec 21 21:43:41 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/StateViewDockable.scala	Sun Dec 21 21:43:41 2008 +0100
@@ -52,6 +52,7 @@
     }
   }
 
+  
   // copy & paste
   (new SelectionActions).install(panel)
 
@@ -62,12 +63,12 @@
 
   private val fontResolver =
     panel.getSharedContext.getFontResolver.asInstanceOf[AWTFontResolver]
-  if (Plugin.plugin.viewFont != null)
-    fontResolver.setFontMapping("Isabelle", Plugin.plugin.viewFont)
+  if (Plugin.self.font != null)
+    fontResolver.setFontMapping("Isabelle", Plugin.self.font)
 
-  Plugin.plugin.viewFontChanged.add(font => {
-    if (Plugin.plugin.viewFont != null)
-      fontResolver.setFontMapping("Isabelle", Plugin.plugin.viewFont)
+  Plugin.self.font_changed.add(font => {
+    if (Plugin.self.font != null)
+      fontResolver.setFontMapping("Isabelle", Plugin.self.font)
 
     panel.relayout()
   })
--- a/src/Tools/jEdit/src/jedit/TheoryView.scala	Sun Dec 21 21:43:41 2008 +0100
+++ b/src/Tools/jEdit/src/jedit/TheoryView.scala	Sun Dec 21 21:43:41 2008 +0100
@@ -85,7 +85,7 @@
 
     val repaint_delay = new isabelle.utils.Delay(100, () => repaintAll())
     Plugin.prover(buffer).commandInfo.add(_ => repaint_delay.delay_or_ignore())
-    Plugin.plugin.viewFontChanged.add(font => updateFont())
+    Plugin.self.font_changed.add(font => updateFont())
 
     colTimer.stop
     colTimer.setRepeats(true)
@@ -102,13 +102,13 @@
   private def updateFont() {
     if (text_area != null) {
       val painter = text_area.getPainter()
-      if (Plugin.plugin.viewFont != null) {
-        painter.setStyles(painter.getStyles().map(style =>
+      if (Plugin.self.font != null) {
+        painter.setStyles(painter.getStyles.map(style =>
           new SyntaxStyle(style.getForegroundColor, 
                           style.getBackgroundColor, 
-                          Plugin.plugin.viewFont)
+                          Plugin.self.font)
         ))
-        painter.setFont(Plugin.plugin.viewFont)
+        painter.setFont(Plugin.self.font)
         repaintAll()
       }
     }