# HG changeset patch # User wenzelm # Date 1229892221 -3600 # Node ID ba08fc74f98abf7c2d545976a857f49c0904ce6b # Parent 3da749b53842045f1e37eefc3e58d79fe2a24667 renamed Plugin.plugin to Plugin.self; tuned Plugin.font handling; diff -r 3da749b53842 -r ba08fc74f98a src/Tools/jEdit/src/jedit/ScrollerDockable.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 diff -r 3da749b53842 -r ba08fc74f98a src/Tools/jEdit/src/jedit/StateViewDockable.scala --- 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() }) diff -r 3da749b53842 -r ba08fc74f98a src/Tools/jEdit/src/jedit/TheoryView.scala --- 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() } }