src/Tools/jEdit/src/jedit/Plugin.scala
changeset 34615 5e61055bf35b
parent 34612 5a03dc7a19e1
child 34618 e45052ff7233
equal deleted inserted replaced
34614:25b178e4faaf 34615:5e61055bf35b
    13 import javax.swing.JScrollPane
    13 import javax.swing.JScrollPane
    14 
    14 
    15 import scala.collection.mutable
    15 import scala.collection.mutable
    16 
    16 
    17 import isabelle.prover.{Prover, Command}
    17 import isabelle.prover.{Prover, Command}
    18 import isabelle.IsabelleSystem
    18 import isabelle.Isabelle_System
    19 
    19 
    20 import org.gjt.sp.jedit.{jEdit, EBMessage, EBPlugin, Buffer, EditPane, ServiceManager, View}
    20 import org.gjt.sp.jedit.{jEdit, EBMessage, EBPlugin, Buffer, EditPane, ServiceManager, View}
    21 import org.gjt.sp.jedit.buffer.JEditBuffer
    21 import org.gjt.sp.jedit.buffer.JEditBuffer
    22 import org.gjt.sp.jedit.textarea.JEditTextArea
    22 import org.gjt.sp.jedit.textarea.JEditTextArea
    23 import org.gjt.sp.jedit.msg.{EditPaneUpdate, PropertiesChanged}
    23 import org.gjt.sp.jedit.msg.{EditPaneUpdate, PropertiesChanged}
    34     def apply(name: String) = jEdit.getProperty(OPTION_PREFIX + name)
    34     def apply(name: String) = jEdit.getProperty(OPTION_PREFIX + name)
    35     def update(name: String, value: String) = jEdit.setProperty(OPTION_PREFIX + name, value)
    35     def update(name: String, value: String) = jEdit.setProperty(OPTION_PREFIX + name, value)
    36   }
    36   }
    37 
    37 
    38   // Isabelle system instance
    38   // Isabelle system instance
    39   var system: IsabelleSystem = null
    39   var system: Isabelle_System = null
    40   def symbols = system.symbols
    40   def symbols = system.symbols
    41   lazy val completion = new Completion + symbols
    41   lazy val completion = new Completion + symbols
    42 
    42 
    43   // settings
    43   // settings
    44   def default_logic = {
    44   def default_logic = {
   127     }
   127     }
   128     case _ =>
   128     case _ =>
   129   }
   129   }
   130 
   130 
   131   override def start() {
   131   override def start() {
   132     Isabelle.system = new IsabelleSystem
   132     Isabelle.system = new Isabelle_System
   133     Isabelle.plugin = this
   133     Isabelle.plugin = this
   134     
   134     
   135     if (Isabelle.Property("font-path") != null && Isabelle.Property("font-size") != null)
   135     if (Isabelle.Property("font-path") != null && Isabelle.Property("font-size") != null)
   136       try {
   136       try {
   137         set_font(Isabelle.Property("font-path"), Isabelle.Property("font-size").toFloat)
   137         set_font(Isabelle.Property("font-path"), Isabelle.Property("font-size").toFloat)