mirror of
https://github.com/chylex/IntelliJ-Inspection-Lens.git
synced 2025-05-08 02:34:05 +02:00
Replace deprecated FileEditorManagerListener API
This commit is contained in:
parent
797efb48a2
commit
86a3a87da2
src/main
@ -1,7 +1,7 @@
|
||||
package com.chylex.intellij.inspectionlens
|
||||
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager
|
||||
import com.intellij.openapi.fileEditor.FileEditorManagerListener
|
||||
import com.intellij.openapi.fileEditor.FileOpenedSyncListener
|
||||
import com.intellij.openapi.fileEditor.TextEditor
|
||||
import com.intellij.openapi.fileEditor.ex.FileEditorWithProvider
|
||||
import com.intellij.openapi.vfs.VirtualFile
|
||||
@ -9,8 +9,8 @@ import com.intellij.openapi.vfs.VirtualFile
|
||||
/**
|
||||
* Listens for newly opened editors, and installs a [LensMarkupModelListener] on them.
|
||||
*/
|
||||
class LensFileEditorListener : FileEditorManagerListener {
|
||||
override fun fileOpenedSync(source: FileEditorManager, file: VirtualFile, editorsWithProviders: MutableList<FileEditorWithProvider>) {
|
||||
class LensFileOpenedListener : FileOpenedSyncListener {
|
||||
override fun fileOpenedSync(source: FileEditorManager, file: VirtualFile, editorsWithProviders: List<FileEditorWithProvider>) {
|
||||
for (editorWrapper in editorsWithProviders) {
|
||||
val fileEditor = editorWrapper.fileEditor
|
||||
if (fileEditor is TextEditor) {
|
@ -44,6 +44,6 @@
|
||||
</applicationListeners>
|
||||
|
||||
<projectListeners>
|
||||
<listener class="com.chylex.intellij.inspectionlens.LensFileEditorListener" topic="com.intellij.openapi.fileEditor.FileEditorManagerListener" />
|
||||
<listener class="com.chylex.intellij.inspectionlens.LensFileOpenedListener" topic="com.intellij.openapi.fileEditor.FileOpenedSyncListener" />
|
||||
</projectListeners>
|
||||
</idea-plugin>
|
||||
|
Loading…
Reference in New Issue
Block a user