[service view] IJPL-211147 Test navigation does nothing

(cherry picked from commit 99d27c8fe447b837d8b8b06cbb8766ac399c8cc9)

IJ-CR-178950

GitOrigin-RevId: 4f1824b4ee2303af196e091d2ffc89fb820b7580
This commit is contained in:
Gregory.Shrago
2025-10-22 23:36:26 +00:00
committed by intellij-monorepo-bot
parent 1eec09fdee
commit 3db60a3e9d
@@ -10,7 +10,9 @@ class ServiceViewSelectionDataRule : UiDataRule {
override fun uiDataSnapshot(sink: DataSink, snapshot: DataSnapshot) {
val project = snapshot[CommonDataKeys.PROJECT] ?: return
val ids = snapshot[SERVICES_SELECTED_DESCRIPTOR_IDS] ?: return
sink[CommonDataKeys.NAVIGATABLE_ARRAY] = ids.mapNotNull { it.getNavigatable(project) }.toTypedArray()
val navigatables = ids.mapNotNull { it.getNavigatable(project) }.toTypedArray()
sink.lazy(CommonDataKeys.NAVIGATABLE) { navigatables.firstOrNull() }
sink.lazy(CommonDataKeys.NAVIGATABLE_ARRAY) { navigatables }
sink[PlatformCoreDataKeys.SELECTED_ITEMS] = ids.mapNotNull { it.getSelectedItem(project) }.toTypedArray()
}
}