1
0
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. "d711e60da8ce3981a8f1530e4f157104b4686310" and "f3a36850846f39d09477afd7f791eb9866744a79" have entirely different histories.

7 changed files with 10 additions and 13 deletions

View File

@ -8,7 +8,7 @@ plugins {
} }
group = "com.chylex.intellij.keyboardmaster" group = "com.chylex.intellij.keyboardmaster"
version = "0.6.0" version = "0.5.8"
repositories { repositories {
mavenCentral() mavenCentral()
@ -16,7 +16,7 @@ repositories {
intellij { intellij {
type.set("IU") type.set("IU")
version.set("2024.2") version.set("2024.1.1")
updateSinceUntilBuild.set(false) updateSinceUntilBuild.set(false)
plugins.add("com.intellij.java") plugins.add("com.intellij.java")
@ -35,7 +35,7 @@ dependencies {
} }
tasks.patchPluginXml { tasks.patchPluginXml {
sinceBuild.set("242") sinceBuild.set("241")
} }
tasks.test { tasks.test {

View File

@ -2,10 +2,9 @@ package com.chylex.intellij.keyboardmaster.feature.action.gotoError
import com.intellij.codeInsight.CodeInsightActionHandler import com.intellij.codeInsight.CodeInsightActionHandler
import com.intellij.codeInsight.daemon.impl.actions.GotoNextErrorAction import com.intellij.codeInsight.daemon.impl.actions.GotoNextErrorAction
import com.intellij.openapi.actionSystem.DataContext
class GotoNextErrorInOtherModeAction : GotoNextErrorAction() { class GotoNextErrorInOtherModeAction : GotoNextErrorAction() {
override fun getHandler(dataContext: DataContext): CodeInsightActionHandler { override fun getHandler(): CodeInsightActionHandler {
return GotoErrorInOtherModeHandler(forward = true) return GotoErrorInOtherModeHandler(forward = true)
} }
} }

View File

@ -2,10 +2,9 @@ package com.chylex.intellij.keyboardmaster.feature.action.gotoError
import com.intellij.codeInsight.CodeInsightActionHandler import com.intellij.codeInsight.CodeInsightActionHandler
import com.intellij.codeInsight.daemon.impl.actions.GotoPreviousErrorAction import com.intellij.codeInsight.daemon.impl.actions.GotoPreviousErrorAction
import com.intellij.openapi.actionSystem.DataContext
class GotoPreviousErrorInOtherModeAction : GotoPreviousErrorAction() { class GotoPreviousErrorInOtherModeAction : GotoPreviousErrorAction() {
override fun getHandler(dataContext: DataContext): CodeInsightActionHandler { override fun getHandler(): CodeInsightActionHandler {
return GotoErrorInOtherModeHandler(forward = false) return GotoErrorInOtherModeHandler(forward = false)
} }
} }

View File

@ -52,7 +52,7 @@ class GotoTypeInFileHandler(private val forward: Boolean) : CodeInsightActionHan
private companion object { private companion object {
fun getNavigationOffsets(file: PsiFile, searchedOffsetRange: IntRange): IntArray { fun getNavigationOffsets(file: PsiFile, searchedOffsetRange: IntRange): IntArray {
val structureViewBuilder = LanguageStructureViewBuilder.getInstance().getStructureViewBuilder(file) val structureViewBuilder = LanguageStructureViewBuilder.INSTANCE.getStructureViewBuilder(file)
if (structureViewBuilder !is TreeBasedStructureViewBuilder) { if (structureViewBuilder !is TreeBasedStructureViewBuilder) {
return intArrayOf() return intArrayOf()
} }

View File

@ -1,13 +1,13 @@
package com.chylex.intellij.keyboardmaster.feature.codeCompletion package com.chylex.intellij.keyboardmaster.feature.codeCompletion
import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap import com.intellij.util.containers.IntIntHashMap
object CodeCompletionPopupConfiguration { object CodeCompletionPopupConfiguration {
const val SHORTCUT_NONE = -1 const val SHORTCUT_NONE = -1
const val SHORTCUT_NEXT_PAGE = -2 const val SHORTCUT_NEXT_PAGE = -2
const val SHORTCUT_PREV_PAGE = -3 const val SHORTCUT_PREV_PAGE = -3
private val charToShortcutMap = Int2IntOpenHashMap(16).also { it.defaultReturnValue(SHORTCUT_NONE) } private val charToShortcutMap = IntIntHashMap(16, SHORTCUT_NONE)
private var hintTexts = mutableListOf<String>() private var hintTexts = mutableListOf<String>()
val itemShortcutCount val itemShortcutCount

View File

@ -59,7 +59,7 @@ internal interface KeyStrokeNode<T> {
override fun performAction(holder: T, actionEvent: AnActionEvent, keyEvent: KeyEvent) { override fun performAction(holder: T, actionEvent: AnActionEvent, keyEvent: KeyEvent) {
val action = actionEvent.actionManager.getAction(name) ?: return val action = actionEvent.actionManager.getAction(name) ?: return
val dataContext = CustomizedDataContext.withProvider(actionEvent.dataContext) { val dataContext = CustomizedDataContext.create(actionEvent.dataContext) {
when { when {
PlatformDataKeys.CONTEXT_COMPONENT.`is`(it) -> holder.component PlatformDataKeys.CONTEXT_COMPONENT.`is`(it) -> holder.component
else -> null else -> null

View File

@ -28,8 +28,7 @@ import javax.swing.KeyStroke
internal open class VimNavigationDispatcher<T : JComponent>(final override val component: T, private val rootNode: KeyStrokeNode.Parent<VimNavigationDispatcher<T>>) : 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 private val DISPOSABLE = ApplicationManager.getApplication().getService(PluginDisposableService::class.java)
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)