mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
CWM-6583 ActionUpdater.doUpdate: Index 0 out of bounds for length 0
GitOrigin-RevId: c587e183a55e9ee849bedbda693f8e9ee47373f5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
25f960a0b2
commit
d13bc988ba
@@ -60,7 +60,7 @@ internal val AnActionEvent.contextBookmark: Bookmark?
|
||||
// TODO mouse shortcuts as in gutter/LOGICAL_LINE_AT_CURSOR
|
||||
val items = getData(PlatformDataKeys.SELECTED_ITEMS)
|
||||
if (items != null && items.size > 1) return null
|
||||
val item = items?.get(0) ?: getData(CommonDataKeys.PSI_ELEMENT) ?: getData(CommonDataKeys.VIRTUAL_FILE)
|
||||
val item = items?.firstOrNull() ?: getData(CommonDataKeys.PSI_ELEMENT) ?: getData(CommonDataKeys.VIRTUAL_FILE)
|
||||
return when (item) {
|
||||
is AbstractTreeNode<*> -> manager.createBookmark(item.value)
|
||||
is SmartElementDescriptor -> manager.createBookmark(item.psiElement)
|
||||
|
||||
Reference in New Issue
Block a user