Remove EditorFactoryListenerWrapper compat after removing 182

#KT-33536 Fixed
This commit is contained in:
Nikolay Krasko
2019-08-27 19:04:02 +03:00
parent 9abdddf09a
commit 23f488498f
4 changed files with 4 additions and 19 deletions
@@ -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,7 +105,7 @@ class LookupCancelWatcher(val project: Project) : ProjectComponent {
override fun initComponent() {
EditorFactory.getInstance().addEditorFactoryListener(
object : EditorFactoryListenerWrapper {
object : EditorFactoryListener {
override fun editorReleased(event: EditorFactoryEvent) {
if (lastReminiscence?.editor == event.editor) {
lastReminiscence!!.dispose()
@@ -11,16 +11,16 @@ import com.intellij.openapi.editor.Editor
import com.intellij.openapi.editor.EditorFactory
import com.intellij.openapi.editor.RangeMarker
import com.intellij.openapi.editor.event.EditorFactoryEvent
import com.intellij.openapi.editor.event.EditorFactoryListener
import com.intellij.openapi.project.Project
import com.intellij.psi.PsiElement
import com.intellij.util.containers.ContainerUtil
import org.jetbrains.kotlin.idea.core.util.range
import org.jetbrains.kotlin.idea.util.application.runReadAction
import org.jetbrains.kotlin.idea.util.compat.EditorFactoryListenerWrapper
import org.jetbrains.kotlin.psi.psiUtil.endOffset
import java.util.concurrent.ConcurrentHashMap
class KotlinCodeHintsModel(val project: Project) : EditorFactoryListenerWrapper {
class KotlinCodeHintsModel(val project: Project) : EditorFactoryListener {
companion object {
fun getInstance(project: Project): KotlinCodeHintsModel =
project.getComponent(KotlinCodeHintsModel::class.java) ?: error("Component `KotlinCodeHintsModel` is expected to be registered")
@@ -1,14 +0,0 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@file:Suppress("IncompatibleAPI")
package org.jetbrains.kotlin.idea.util.compat
import com.intellij.openapi.editor.event.EditorFactoryListener
// Default implementation for interface methods were added in 183.
// BUNCH: 182
typealias EditorFactoryListenerWrapper = EditorFactoryListener