Skip to content

Commit

Permalink
add instruction label to scope input box
Browse files Browse the repository at this point in the history
Co-authored-by: Brianne Oberson <brianne.oberson@epfl.ch>
Signed-off-by: Liam Fogarty <fogarty@ztm.de>
  • Loading branch information
Liam Fogarty and brianneoberson committed Jan 22, 2024
1 parent 94bea87 commit bffb7d5
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ import com.intellij.openapi.ui.TextFieldWithBrowseButton
import com.intellij.ui.TextFieldWithHistory
import com.intellij.ui.components.JBTextField
import com.intellij.util.ui.FormBuilder
import javax.swing.JCheckBox
import com.intellij.util.ui.UIUtil
import java.awt.Font
import javax.swing.JComponent
import javax.swing.JLabel
import javax.swing.JPanel

class SettingsEditor : SettingsEditor<RunConfiguration>() {
private val myPanel: JPanel
private val gradleTaskField: TextFieldWithHistory = TextFieldWithHistory()
private val gradleExecutableField: TextFieldWithBrowseButton = TextFieldWithBrowseButton()
private val scopeField: JBTextField = JBTextField()
private val label = JLabel("Scope should be given as a comma-separated list (no spaces!)\nof the fully qualified names of the desired classes to test.", )

init {
gradleTaskField.text = "pitest"
Expand All @@ -28,10 +31,14 @@ class SettingsEditor : SettingsEditor<RunConfiguration>() {
FileChooserDescriptorFactory.createSingleFileDescriptor()
)
scopeField.emptyText.setText("com.myproj.package1.classA,com.myproj.package1.classB,com.myproj.package2.classC,...")
val userFont = UIUtil.getLabelFont()
val customFont = Font(userFont.name, userFont.style, 12)
label.font = customFont
myPanel = FormBuilder.createFormBuilder()
.addLabeledComponent("Gradle task", gradleTaskField)
.addLabeledComponent("Gradle script", gradleExecutableField)
.addLabeledComponent("Scope", scopeField)
.addLabeledComponent("", label)
.panel
}

Expand Down

0 comments on commit bffb7d5

Please sign in to comment.