in src/org/jetbrains/r/debugger/RXVariablesView.kt [162:181]
override fun onClick(event: MouseEvent, clickCount: Int): Boolean {
if (!SwingUtilities.isLeftMouseButton(event) || event.isShiftDown || event.isAltDown || event.isControlDown || event.isMetaDown) {
return false
}
if (!isAboveSelectedItem(event, watchTree, false) || clickCount > 1) {
editAlarm.cancelAllRequests()
return false
}
val editWatchAction = ActionManager.getInstance().getAction(XDebuggerActions.XEDIT_WATCH)
val presentation = editWatchAction.getTemplatePresentation().clone()
val context = DataManager.getInstance().getDataContext(watchTree)
val actionEvent = AnActionEvent.createEvent(context, presentation, "WATCH_TREE", ActionUiKind.TOOLBAR, null)
val runnable = { editWatchAction.actionPerformed(actionEvent) }
if (editAlarm.isEmpty && quitePeriod.isEmpty) {
editAlarm.addRequest(runnable, getMultiClickInterval())
} else {
editAlarm.cancelAllRequests()
}
return false
}