40 val component = new ComboBox(entries) with Option_Component { |
40 val component = new ComboBox(entries) with Option_Component { |
41 name = opt_name |
41 name = opt_name |
42 val title = "Logic" |
42 val title = "Logic" |
43 def load: Unit = |
43 def load: Unit = |
44 { |
44 { |
45 val logic = Isabelle.options.string(opt_name) |
45 val logic = PIDE.options.string(opt_name) |
46 entries.find(_.name == logic) match { |
46 entries.find(_.name == logic) match { |
47 case Some(entry) => selection.item = entry |
47 case Some(entry) => selection.item = entry |
48 case None => |
48 case None => |
49 } |
49 } |
50 } |
50 } |
51 def save: Unit = Isabelle.options.string(opt_name) = selection.item.name |
51 def save: Unit = PIDE.options.string(opt_name) = selection.item.name |
52 } |
52 } |
53 |
53 |
54 component.load() |
54 component.load() |
55 if (autosave) { |
55 if (autosave) { |
56 component.listenTo(component.selection) |
56 component.listenTo(component.selection) |
57 component.reactions += { case SelectionChanged(_) => component.save() } |
57 component.reactions += { case SelectionChanged(_) => component.save() } |
58 } |
58 } |
59 component.tooltip = Isabelle.options.value.check_name(opt_name).print_default |
59 component.tooltip = PIDE.options.value.check_name(opt_name).print_default |
60 component |
60 component |
61 } |
61 } |
62 |
62 |
63 def session_args(): List[String] = |
63 def session_args(): List[String] = |
64 { |
64 { |
65 val modes = space_explode(',', Isabelle_System.getenv("JEDIT_PRINT_MODE")).map("-m" + _) |
65 val modes = space_explode(',', Isabelle_System.getenv("JEDIT_PRINT_MODE")).map("-m" + _) |
66 val logic = |
66 val logic = |
67 Isabelle.options.string(opt_name) match { |
67 PIDE.options.string(opt_name) match { |
68 case "" => default_logic() |
68 case "" => default_logic() |
69 case logic => logic |
69 case logic => logic |
70 } |
70 } |
71 modes ::: List(logic) |
71 modes ::: List(logic) |
72 } |
72 } |