Introduce wrapper for EditorFactoryListener to warn about compatibility issues
This commit is contained in:
+2
-7
@@ -28,9 +28,9 @@ import com.intellij.openapi.editor.RangeMarker
|
||||
import com.intellij.openapi.editor.event.CaretEvent
|
||||
import com.intellij.openapi.editor.event.CaretListener
|
||||
import com.intellij.openapi.editor.event.EditorFactoryEvent
|
||||
import com.intellij.openapi.editor.event.EditorFactoryListener
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.Key
|
||||
import org.jetbrains.kotlin.idea.util.compat.EditorFactoryListenerWrapper
|
||||
|
||||
class LookupCancelWatcher(val project: Project) : ProjectComponent {
|
||||
private class Reminiscence(editor: Editor, offset: Int) {
|
||||
@@ -105,17 +105,12 @@ class LookupCancelWatcher(val project: Project) : ProjectComponent {
|
||||
|
||||
override fun initComponent() {
|
||||
EditorFactory.getInstance().addEditorFactoryListener(
|
||||
object : EditorFactoryListener {
|
||||
object : EditorFactoryListenerWrapper {
|
||||
override fun editorReleased(event: EditorFactoryEvent) {
|
||||
if (lastReminiscence?.editor == event.editor) {
|
||||
lastReminiscence!!.dispose()
|
||||
}
|
||||
}
|
||||
|
||||
override fun editorCreated(event: EditorFactoryEvent) {
|
||||
// BUNCH: 182 Has default implementation since 183
|
||||
// Do nothing
|
||||
}
|
||||
},
|
||||
project
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user