src/Tools/jEdit/src/isabelle_logic.scala
changeset 49270 e5d162d15867
parent 49248 bff772033a97
child 49289 60424f123621
     1.1 --- a/src/Tools/jEdit/src/isabelle_logic.scala	Tue Sep 11 11:53:34 2012 +0200
     1.2 +++ b/src/Tools/jEdit/src/isabelle_logic.scala	Tue Sep 11 15:47:42 2012 +0200
     1.3 @@ -27,6 +27,8 @@
     1.4      override def toString = description
     1.5    }
     1.6  
     1.7 +  private val opt_name = "jedit_logic"
     1.8 +
     1.9    def logic_selector(autosave: Boolean): Option_Component =
    1.10    {
    1.11      Swing_Thread.require()
    1.12 @@ -36,16 +38,17 @@
    1.13          Isabelle_System.find_logics().map(name => new Logic_Entry(name, name))
    1.14  
    1.15      val component = new ComboBox(entries) with Option_Component {
    1.16 -      val title = Isabelle.options.title("jedit_logic")
    1.17 +      name = opt_name
    1.18 +      val title = "Logic"
    1.19        def load: Unit =
    1.20        {
    1.21 -        val logic = Isabelle.options.string("jedit_logic")
    1.22 +        val logic = Isabelle.options.string(opt_name)
    1.23          entries.find(_.name == logic) match {
    1.24            case Some(entry) => selection.item = entry
    1.25            case None =>
    1.26          }
    1.27        }
    1.28 -      def save: Unit = Isabelle.options.string("jedit_logic") = selection.item.name
    1.29 +      def save: Unit = Isabelle.options.string(opt_name) = selection.item.name
    1.30      }
    1.31  
    1.32      component.load()
    1.33 @@ -53,7 +56,7 @@
    1.34        component.listenTo(component.selection)
    1.35        component.reactions += { case SelectionChanged(_) => component.save() }
    1.36      }
    1.37 -    component.tooltip = Isabelle.tooltip(Isabelle.options.value.check_name("jedit_logic").print)
    1.38 +    component.tooltip = Isabelle.tooltip(Isabelle.options.value.check_name(opt_name).print)
    1.39      component
    1.40    }
    1.41  
    1.42 @@ -61,7 +64,7 @@
    1.43    {
    1.44      val modes = space_explode(',', Isabelle_System.getenv("JEDIT_PRINT_MODE")).map("-m" + _)
    1.45      val logic =
    1.46 -      Isabelle.options.string("jedit_logic") match {
    1.47 +      Isabelle.options.string(opt_name) match {
    1.48          case "" => default_logic()
    1.49          case logic => logic
    1.50        }