Skip to content

Commit b9e50f9

Browse files
committed
Fixed checkboxes
1 parent c13eba0 commit b9e50f9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/js/JsDialogWindow.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,23 @@ class JsDialogWindow(val model: JsTestsModel): DialogWrapper(model.project) {
4141
}
4242
}
4343
initDefaultValues()
44+
checkBoxUpdate()
4445
return panel
4546
}
4647

48+
private fun checkBoxUpdate() {
49+
if (items == null) return
50+
val focusedNames = model.focusedMethod?.map { it.name }
51+
val selectedMethods = items.filter {
52+
focusedNames?.contains(it.member.name) ?: false
53+
}
54+
if (selectedMethods.isEmpty()) {
55+
checkMembers(items)
56+
} else {
57+
checkMembers(selectedMethods)
58+
}
59+
}
60+
4761
private fun initDefaultValues() {
4862
}
4963

0 commit comments

Comments
 (0)