mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-02-26 14:46:00 +01:00
Move to concurrent list
This commit is contained in:
parent
7fde66eb40
commit
fc46acb2e4
@ -11,13 +11,14 @@ package com.maddyhome.idea.vim.common
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.state.mode.Mode
|
||||
import org.jetbrains.annotations.ApiStatus.Internal
|
||||
import java.util.concurrent.ConcurrentLinkedDeque
|
||||
|
||||
@Internal // please do not use this class in your plugins, API is not final and will be changed in future releases
|
||||
public class VimListenersNotifier {
|
||||
public val modeChangeListeners: MutableList<ModeChangeListener> = mutableListOf()
|
||||
public val myEditorListeners: MutableList<EditorListener> = mutableListOf()
|
||||
public val macroRecordingListeners: MutableList<MacroRecordingListener> = mutableListOf()
|
||||
public val vimPluginListeners: MutableList<VimPluginListener> = mutableListOf()
|
||||
public val modeChangeListeners: MutableCollection<ModeChangeListener> = ConcurrentLinkedDeque()
|
||||
public val myEditorListeners: MutableCollection<EditorListener> = ConcurrentLinkedDeque()
|
||||
public val macroRecordingListeners: MutableCollection<MacroRecordingListener> = ConcurrentLinkedDeque()
|
||||
public val vimPluginListeners: MutableCollection<VimPluginListener> = ConcurrentLinkedDeque()
|
||||
|
||||
public fun notifyModeChanged(editor: VimEditor, oldMode: Mode) {
|
||||
modeChangeListeners.forEach { it.modeChanged(editor, oldMode) }
|
||||
|
Loading…
Reference in New Issue
Block a user