mirror of
https://github.com/chylex/IntelliJ-Keyboard-Master.git
synced 2024-11-25 01:42:47 +01:00
Compare commits
No commits in common. "f814ec04bd711174445f3ae3bcd560cbecb2e6a4" and "d711e60da8ce3981a8f1530e4f157104b4686310" have entirely different histories.
f814ec04bd
...
d711e60da8
@ -8,7 +8,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.chylex.intellij.keyboardmaster"
|
group = "com.chylex.intellij.keyboardmaster"
|
||||||
version = "0.6.1"
|
version = "0.6.0"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -27,7 +27,7 @@ object VimNavigation {
|
|||||||
fun register() {
|
fun register() {
|
||||||
val disposable = ApplicationManager.getApplication().getService(PluginDisposableService::class.java)
|
val disposable = ApplicationManager.getApplication().getService(PluginDisposableService::class.java)
|
||||||
|
|
||||||
StartupUiUtil.addAwtListener(AWTEvent.FOCUS_EVENT_MASK, disposable, ::handleEvent)
|
StartupUiUtil.addAwtListener(::handleEvent, AWTEvent.FOCUS_EVENT_MASK, disposable)
|
||||||
UiInterceptors.registerPersistent(disposable, PopupInterceptor)
|
UiInterceptors.registerPersistent(disposable, PopupInterceptor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.chylex.intellij.keyboardmaster.feature.vimNavigation
|
package com.chylex.intellij.keyboardmaster.feature.vimNavigation
|
||||||
|
|
||||||
|
import com.chylex.intellij.keyboardmaster.PluginDisposableService
|
||||||
import com.chylex.intellij.keyboardmaster.feature.vimNavigation.VimNavigationDispatcher.WrappedAction.ForKeyListener
|
import com.chylex.intellij.keyboardmaster.feature.vimNavigation.VimNavigationDispatcher.WrappedAction.ForKeyListener
|
||||||
import com.intellij.openapi.Disposable
|
|
||||||
import com.intellij.openapi.actionSystem.ActionUpdateThread
|
import com.intellij.openapi.actionSystem.ActionUpdateThread
|
||||||
import com.intellij.openapi.actionSystem.AnAction
|
import com.intellij.openapi.actionSystem.AnAction
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||||
@ -26,8 +26,11 @@ import javax.swing.Action
|
|||||||
import javax.swing.JComponent
|
import javax.swing.JComponent
|
||||||
import javax.swing.KeyStroke
|
import javax.swing.KeyStroke
|
||||||
|
|
||||||
internal open class VimNavigationDispatcher<T : JComponent>(final override val component: T, private val rootNode: KeyStrokeNode.Parent<VimNavigationDispatcher<T>>, disposable: Disposable? = null) : DumbAwareAction(), ComponentHolder {
|
internal open class VimNavigationDispatcher<T : JComponent>(final override val component: T, private val rootNode: KeyStrokeNode.Parent<VimNavigationDispatcher<T>>) : DumbAwareAction(), ComponentHolder {
|
||||||
companion object {
|
companion object {
|
||||||
|
private val DISPOSABLE
|
||||||
|
get() = ApplicationManager.getApplication().getService(PluginDisposableService::class.java)
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
protected val ENTER_KEY: KeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0)
|
protected val ENTER_KEY: KeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0)
|
||||||
|
|
||||||
@ -71,7 +74,7 @@ internal open class VimNavigationDispatcher<T : JComponent>(final override val c
|
|||||||
var isSearching = AtomicBoolean(false)
|
var isSearching = AtomicBoolean(false)
|
||||||
|
|
||||||
init {
|
init {
|
||||||
registerCustomShortcutSet(KeyStrokeNode.getAllShortcuts(getAllKeyStrokes()), component, disposable)
|
registerCustomShortcutSet(KeyStrokeNode.getAllShortcuts(getAllKeyStrokes()), component, DISPOSABLE)
|
||||||
SpeedSearchSupply.getSupply(component, true)?.addChangeListener(::handleSpeedSearchChange)
|
SpeedSearchSupply.getSupply(component, true)?.addChangeListener(::handleSpeedSearchChange)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ internal object VimListNavigation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("serial")
|
@Suppress("serial")
|
||||||
private class VimPopupListNavigationDispatcher(component: JList<*>, override val popup: WizardPopup) : VimNavigationDispatcher<JList<*>>(component, POPUP_LIST_ROOT_NODE, popup.parent) {
|
private class VimPopupListNavigationDispatcher(component: JList<*>, override val popup: WizardPopup) : VimNavigationDispatcher<JList<*>>(component, POPUP_LIST_ROOT_NODE) {
|
||||||
init {
|
init {
|
||||||
val speedSearch = SpeedSearchSupply.getSupply(component, true) as? SpeedSearch
|
val speedSearch = SpeedSearchSupply.getSupply(component, true) as? SpeedSearch
|
||||||
if (speedSearch != null) {
|
if (speedSearch != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user