Skip to content

Commit 3c5ecf2

Browse files
Allow non-unique names in list of classes (#2099)
List of classes, displayed on plugin UI, may miss some items #2097
1 parent 86544b6 commit 3c5ecf2

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/GenerateTestsDialogWindow.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import com.intellij.openapi.ui.OptionAction
3232
import com.intellij.openapi.ui.ValidationInfo
3333
import com.intellij.openapi.ui.popup.IconButton
3434
import com.intellij.openapi.util.Computable
35-
import com.intellij.openapi.util.text.StringUtil
3635
import com.intellij.openapi.vfs.StandardFileSystems
3736
import com.intellij.openapi.vfs.VfsUtil
3837
import com.intellij.openapi.vfs.VfsUtilCore.urlToPath
@@ -155,11 +154,9 @@ import org.utbot.intellij.plugin.ui.utils.testRootType
155154
import org.utbot.intellij.plugin.util.IntelliJApiHelper
156155
import org.utbot.intellij.plugin.util.extractFirstLevelMembers
157156
import org.utbot.intellij.plugin.util.findSdkVersion
158-
import java.awt.Component
159157
import java.time.LocalDateTime
160158
import java.time.format.DateTimeFormatter
161159
import java.util.*
162-
import javax.swing.DefaultListCellRenderer
163160

164161
private const val RECENTS_KEY = "org.utbot.recents"
165162

@@ -461,7 +458,7 @@ class GenerateTestsDialogWindow(val model: GenerateTestsModel) : DialogWrapper(m
461458
srcClasses.flatMap { it.extractFirstLevelMembers(false) }
462459
} else {
463460
srcClasses.map { MemberInfo(it) }
464-
}.toSortedSet { o1, o2 -> o1.displayName.compareTo(o2.displayName, true) }
461+
}.toMutableList().sortedWith { o1, o2 -> o1.displayName.compareTo(o2.displayName, true) }
465462

466463
checkMembers(items)
467464
membersTable.setMemberInfos(items)

0 commit comments

Comments
 (0)