mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[IJ-CR-18377] IDEA-271343 FUS for Log-in: simplified version (21.2)
(cherry picked from commit 385b75b304fb5e13a2f3dcefab8fb2d62375310e) IJ-CR-19002 GitOrigin-RevId: 7082726647575dfe3fcc9a4a21d56201dc4ddf17
This commit is contained in:
committed by
intellij-monorepo-bot
parent
51e506e4b2
commit
913b1c47e7
+11
@@ -2,11 +2,22 @@
|
||||
package com.intellij.internal.statistic.eventLog.events
|
||||
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import java.awt.EventQueue
|
||||
import java.awt.event.ActionEvent
|
||||
import java.awt.event.InputEvent
|
||||
|
||||
data class FusInputEvent(val inputEvent: InputEvent?, val place: String?) {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun from(actionEvent: AnActionEvent?): FusInputEvent? = actionEvent?.let { FusInputEvent(it.inputEvent, it.place) }
|
||||
|
||||
@JvmStatic
|
||||
fun from(actionEvent: ActionEvent?): FusInputEvent? {
|
||||
return actionEvent?.let { ae ->
|
||||
val currentEvent = EventQueue.getCurrentEvent()
|
||||
val inputEvent = if (currentEvent.source == ae.source) currentEvent as? InputEvent else null
|
||||
inputEvent?.let { ie -> FusInputEvent(ie, null) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user