--- a/src/Tools/jEdit/src/sledgehammer_dockable.scala Sat Aug 13 22:41:45 2022 +0200
+++ b/src/Tools/jEdit/src/sledgehammer_dockable.scala Sat Aug 13 23:04:53 2022 +0200
@@ -9,8 +9,7 @@
import isabelle._
-import scala.swing.{Button, Component, Label}
-import scala.swing.event.ButtonClicked
+import scala.swing.{Component, Label}
import java.awt.BorderLayout
import java.awt.event.{ComponentEvent, ComponentAdapter, KeyEvent}
@@ -68,7 +67,7 @@
/* controls */
- private def clicked(): Unit = {
+ private def hammer(): Unit = {
provers.addCurrentToHistory()
PIDE.options.string("sledgehammer_provers") = provers.getText
sledgehammer.apply_query(
@@ -84,7 +83,7 @@
private val provers = new HistoryTextField("isabelle-sledgehammer-provers") {
override def processKeyEvent(evt: KeyEvent): Unit = {
- if (evt.getID == KeyEvent.KEY_PRESSED && evt.getKeyCode == KeyEvent.VK_ENTER) clicked()
+ if (evt.getID == KeyEvent.KEY_PRESSED && evt.getKeyCode == KeyEvent.VK_ENTER) hammer()
super.processKeyEvent(evt)
}
setToolTipText(provers_label.tooltip)
@@ -108,19 +107,19 @@
tooltip = "Try standard proof methods like \"auto\" and \"blast\" as alternatives to \"metis\""
}
- private val apply_query = new Button("<html><b>Apply</b></html>") {
+ private val apply_query = new GUI.Button("<html><b>Apply</b></html>") {
tooltip = "Search for first-order proof using automatic theorem provers"
- reactions += { case ButtonClicked(_) => clicked() }
+ override def clicked(): Unit = hammer()
}
- private val cancel_query = new Button("Cancel") {
+ private val cancel_query = new GUI.Button("Cancel") {
tooltip = "Interrupt unfinished sledgehammering"
- reactions += { case ButtonClicked(_) => sledgehammer.cancel_query() }
+ override def clicked(): Unit = sledgehammer.cancel_query()
}
- private val locate_query = new Button("Locate") {
+ private val locate_query = new GUI.Button("Locate") {
tooltip = "Locate context of current query within source text"
- reactions += { case ButtonClicked(_) => sledgehammer.locate_query() }
+ override def clicked(): Unit = sledgehammer.locate_query()
}
private val zoom = new Font_Info.Zoom { override def changed(): Unit = handle_resize() }