Skip to content

Commit 72931c4

Browse files
committed
Set last button text to 'Finish'
1 parent 47da39f commit 72931c4

File tree

1 file changed

+10
-0
lines changed
  • clion-plugin/src/main/kotlin/org/utbot/cpp/clion/plugin/ui/wizard

1 file changed

+10
-0
lines changed

clion-plugin/src/main/kotlin/org/utbot/cpp/clion/plugin/ui/wizard/UTBotWizard.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import org.utbot.cpp.clion.plugin.ui.wizard.steps.ConnectionStep
1313
import org.utbot.cpp.clion.plugin.ui.wizard.steps.IntroStep
1414
import org.utbot.cpp.clion.plugin.ui.wizard.steps.FinalStep
1515
import org.utbot.cpp.clion.plugin.utils.getCurrentClient
16+
import java.awt.event.KeyEvent
1617

1718
class UTBotWizard(private val project: Project) : AbstractWizard<UTBotBaseWizardStep>("UTBot: Quickstart", project) {
1819
// copy of settings to make changes during wizard steps
@@ -46,6 +47,15 @@ class UTBotWizard(private val project: Project) : AbstractWizard<UTBotBaseWizard
4647
super.doOKAction()
4748
}
4849

50+
override fun updateButtons(lastStep: Boolean, canGoNext: Boolean, firstStep: Boolean) {
51+
// set `ok` button's text on last step to `Finish` instead of `Create`
52+
super.updateButtons(lastStep, canGoNext, firstStep)
53+
if (lastStep) {
54+
nextButton.text = "Finish"
55+
nextButton.mnemonic = KeyEvent.getExtendedKeyCodeForChar('F'.code)
56+
}
57+
}
58+
4959
override fun proceedToNextStep() {
5060
if (currentStepObject?.canProceedToNextStep() != false) {
5161
super.proceedToNextStep()

0 commit comments

Comments
 (0)