mirror of
https://github.com/chylex/IntelliJ-Keyboard-Master.git
synced 2024-11-24 16:42:46 +01:00
Compare commits
2 Commits
f3a3685084
...
d711e60da8
Author | SHA1 | Date | |
---|---|---|---|
d711e60da8 | |||
356826f6ae |
@ -8,7 +8,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "com.chylex.intellij.keyboardmaster"
|
||||
version = "0.5.8"
|
||||
version = "0.6.0"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
@ -16,7 +16,7 @@ repositories {
|
||||
|
||||
intellij {
|
||||
type.set("IU")
|
||||
version.set("2024.1.1")
|
||||
version.set("2024.2")
|
||||
updateSinceUntilBuild.set(false)
|
||||
|
||||
plugins.add("com.intellij.java")
|
||||
@ -35,7 +35,7 @@ dependencies {
|
||||
}
|
||||
|
||||
tasks.patchPluginXml {
|
||||
sinceBuild.set("241")
|
||||
sinceBuild.set("242")
|
||||
}
|
||||
|
||||
tasks.test {
|
||||
|
@ -2,9 +2,10 @@ package com.chylex.intellij.keyboardmaster.feature.action.gotoError
|
||||
|
||||
import com.intellij.codeInsight.CodeInsightActionHandler
|
||||
import com.intellij.codeInsight.daemon.impl.actions.GotoNextErrorAction
|
||||
import com.intellij.openapi.actionSystem.DataContext
|
||||
|
||||
class GotoNextErrorInOtherModeAction : GotoNextErrorAction() {
|
||||
override fun getHandler(): CodeInsightActionHandler {
|
||||
override fun getHandler(dataContext: DataContext): CodeInsightActionHandler {
|
||||
return GotoErrorInOtherModeHandler(forward = true)
|
||||
}
|
||||
}
|
||||
|
@ -2,9 +2,10 @@ package com.chylex.intellij.keyboardmaster.feature.action.gotoError
|
||||
|
||||
import com.intellij.codeInsight.CodeInsightActionHandler
|
||||
import com.intellij.codeInsight.daemon.impl.actions.GotoPreviousErrorAction
|
||||
import com.intellij.openapi.actionSystem.DataContext
|
||||
|
||||
class GotoPreviousErrorInOtherModeAction : GotoPreviousErrorAction() {
|
||||
override fun getHandler(): CodeInsightActionHandler {
|
||||
override fun getHandler(dataContext: DataContext): CodeInsightActionHandler {
|
||||
return GotoErrorInOtherModeHandler(forward = false)
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ class GotoTypeInFileHandler(private val forward: Boolean) : CodeInsightActionHan
|
||||
|
||||
private companion object {
|
||||
fun getNavigationOffsets(file: PsiFile, searchedOffsetRange: IntRange): IntArray {
|
||||
val structureViewBuilder = LanguageStructureViewBuilder.INSTANCE.getStructureViewBuilder(file)
|
||||
val structureViewBuilder = LanguageStructureViewBuilder.getInstance().getStructureViewBuilder(file)
|
||||
if (structureViewBuilder !is TreeBasedStructureViewBuilder) {
|
||||
return intArrayOf()
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
package com.chylex.intellij.keyboardmaster.feature.codeCompletion
|
||||
|
||||
import com.intellij.util.containers.IntIntHashMap
|
||||
import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap
|
||||
|
||||
object CodeCompletionPopupConfiguration {
|
||||
const val SHORTCUT_NONE = -1
|
||||
const val SHORTCUT_NEXT_PAGE = -2
|
||||
const val SHORTCUT_PREV_PAGE = -3
|
||||
|
||||
private val charToShortcutMap = IntIntHashMap(16, SHORTCUT_NONE)
|
||||
private val charToShortcutMap = Int2IntOpenHashMap(16).also { it.defaultReturnValue(SHORTCUT_NONE) }
|
||||
private var hintTexts = mutableListOf<String>()
|
||||
|
||||
val itemShortcutCount
|
||||
|
@ -59,7 +59,7 @@ internal interface KeyStrokeNode<T> {
|
||||
override fun performAction(holder: T, actionEvent: AnActionEvent, keyEvent: KeyEvent) {
|
||||
val action = actionEvent.actionManager.getAction(name) ?: return
|
||||
|
||||
val dataContext = CustomizedDataContext.create(actionEvent.dataContext) {
|
||||
val dataContext = CustomizedDataContext.withProvider(actionEvent.dataContext) {
|
||||
when {
|
||||
PlatformDataKeys.CONTEXT_COMPONENT.`is`(it) -> holder.component
|
||||
else -> null
|
||||
|
@ -28,7 +28,8 @@ import javax.swing.KeyStroke
|
||||
|
||||
internal open class VimNavigationDispatcher<T : JComponent>(final override val component: T, private val rootNode: KeyStrokeNode.Parent<VimNavigationDispatcher<T>>) : DumbAwareAction(), ComponentHolder {
|
||||
companion object {
|
||||
private val DISPOSABLE = ApplicationManager.getApplication().getService(PluginDisposableService::class.java)
|
||||
private val DISPOSABLE
|
||||
get() = ApplicationManager.getApplication().getService(PluginDisposableService::class.java)
|
||||
|
||||
@JvmStatic
|
||||
protected val ENTER_KEY: KeyStroke = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user