Skip to content

Commit e1eb057

Browse files
Broken action for Project View multi-selection in IDEA 2022.3 (#1959)
Broken action for Project View multi-selection: in IDEA 2022.3 PSI_ELEMENT_ARRAY should be used (it also works in previous IntelliJ API versions)
1 parent c93276c commit e1eb057

File tree

2 files changed

+2
-2
lines changed
  • utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/language
  • utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/language/agnostic

2 files changed

+2
-2
lines changed

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/language/JavaLanguage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ object JvmLanguageAssistant : LanguageAssistant() {
109109
}
110110
}
111111
} else {
112-
val someSelection = e.getData(PlatformDataKeys.SELECTED_ITEMS)?: return null
112+
val someSelection = e.getData(PlatformDataKeys.PSI_ELEMENT_ARRAY)?: return null
113113
someSelection.forEach {
114114
when(it) {
115115
is PsiFileSystemItem -> srcClasses += getAllClasses(project, arrayOf(it.virtualFile))

utbot-ui-commons/src/main/kotlin/org/utbot/intellij/plugin/language/agnostic/LanguageAssistant.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ abstract class LanguageAssistant {
4545
element.containingFile?.let { getLanguageFromFile(it) }
4646
}
4747
else -> {
48-
val someSelection = e.getData(PlatformDataKeys.SELECTED_ITEMS)?: return null
48+
val someSelection = e.getData(PlatformDataKeys.PSI_ELEMENT_ARRAY)?: return null
4949
someSelection.firstNotNullOfOrNull {
5050
when(it) {
5151
is PsiFileSystemItem -> findLanguageRecursively(project, arrayOf(it.virtualFile))

0 commit comments

Comments
 (0)