1
0
mirror of https://github.com/chylex/IntelliJ-IdeaVim.git synced 2025-01-07 07:42:48 +01:00

Revert "Stop IdeaVim actions flowing into JB Client"

This reverts commit bd192561ae.

This commit reverts the fix for VIM-3283 because it causes VIM-3346 and VIM-3347
This commit is contained in:
Alex Plate 2024-03-20 13:07:22 +02:00
parent 0e057ca9ae
commit 58a8b96c3c
No known key found for this signature in database
GPG Key ID: 0B97153C8FFEC09F
9 changed files with 10 additions and 26 deletions

View File

@ -11,7 +11,6 @@ package com.maddyhome.idea.vim.action
import com.intellij.openapi.actionSystem.ActionPlaces
import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.remoting.ActionRemoteBehaviorSpecification
import com.intellij.openapi.project.DumbAwareToggleAction
import com.maddyhome.idea.vim.VimPlugin
import com.maddyhome.idea.vim.helper.MessageHelper
@ -20,7 +19,7 @@ import com.maddyhome.idea.vim.helper.MessageHelper
* This class is used to handle the Vim Plugin enabled/disabled toggle. This is most likely used as a menu option
* but could also be used as a toolbar item.
*/
internal class VimPluginToggleAction : DumbAwareToggleAction(), ActionRemoteBehaviorSpecification.Disabled/*, LightEditCompatible*/ {
internal class VimPluginToggleAction : DumbAwareToggleAction()/*, LightEditCompatible*/ {
override fun isSelected(event: AnActionEvent): Boolean = VimPlugin.isEnabled()
override fun setSelected(event: AnActionEvent, b: Boolean) {

View File

@ -15,7 +15,6 @@ import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.AnActionWrapper
import com.intellij.openapi.actionSystem.PlatformDataKeys
import com.intellij.openapi.actionSystem.remoting.ActionRemoteBehaviorSpecification
import com.intellij.openapi.application.invokeLater
import com.intellij.openapi.diagnostic.logger
import com.intellij.openapi.editor.Editor
@ -59,7 +58,7 @@ import javax.swing.KeyStroke
* This class is used in Which-Key plugin, so don't make it internal. Generally, we should provide a proper
* way to get ideavim keys for this plugin. See VIM-3085
*/
public class VimShortcutKeyAction : AnAction(), DumbAware, ActionRemoteBehaviorSpecification.Disabled/*, LightEditCompatible*/ {
public class VimShortcutKeyAction : AnAction(), DumbAware/*, LightEditCompatible*/ {
private val traceTime: Boolean
get() {
// Make sure the injector is initialized
@ -392,4 +391,4 @@ private class ActionEnableStatus(
private enum class LogLevel {
DEBUG, INFO, ERROR,
}
}

View File

@ -13,7 +13,6 @@ import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.actionSystem.DataContext
import com.intellij.openapi.actionSystem.remoting.ActionRemoteBehaviorSpecification
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.editor.EditorCustomElementRenderer
import com.intellij.openapi.editor.Inlay
@ -33,7 +32,7 @@ import java.util.*
import javax.swing.UIManager
import kotlin.math.max
internal class AddBlockInlaysAction : AnAction(), ActionRemoteBehaviorSpecification.Disabled {
internal class AddBlockInlaysAction : AnAction() {
override fun actionPerformed(e: AnActionEvent) {
val dataContext = e.dataContext
val editor = getEditor(dataContext) ?: return

View File

@ -13,7 +13,6 @@ import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.actionSystem.DataContext
import com.intellij.openapi.actionSystem.remoting.ActionRemoteBehaviorSpecification
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.editor.VisualPosition
import com.maddyhome.idea.vim.api.lineLength
@ -23,7 +22,7 @@ import com.maddyhome.idea.vim.newapi.vim
import java.util.*
import kotlin.math.max
internal class AddInlineInlaysAction : AnAction(), ActionRemoteBehaviorSpecification.Disabled {
internal class AddInlineInlaysAction : AnAction() {
companion object {
private val random = Random()
}

View File

@ -26,7 +26,6 @@ import com.intellij.openapi.actionSystem.AnActionWrapper
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.actionSystem.ex.AnActionListener
import com.intellij.openapi.actionSystem.impl.ProxyShortcutSet
import com.intellij.openapi.actionSystem.remoting.ActionRemoteBehaviorSpecification
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.DumbAwareToggleAction
import com.intellij.openapi.util.TextRange
@ -208,7 +207,7 @@ internal object IdeaSpecifics {
}
//region Find action ID
internal class FindActionIdAction : DumbAwareToggleAction(), ActionRemoteBehaviorSpecification.Disabled {
internal class FindActionIdAction : DumbAwareToggleAction() {
override fun isSelected(e: AnActionEvent): Boolean = injector.globalIjOptions().trackactionids
override fun setSelected(e: AnActionEvent, state: Boolean) {

View File

@ -15,7 +15,6 @@ import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.DataContext
import com.intellij.openapi.actionSystem.DefaultActionGroup
import com.intellij.openapi.actionSystem.PlatformDataKeys
import com.intellij.openapi.actionSystem.remoting.ActionRemoteBehaviorSpecification
import com.intellij.openapi.diagnostic.logger
import com.intellij.openapi.editor.Document
import com.intellij.openapi.editor.toolbar.floating.AbstractFloatingToolbarProvider
@ -110,7 +109,7 @@ internal object VimRcFileState : VimrcFileState {
}
}
internal class ReloadVimRc : DumbAwareAction(), ActionRemoteBehaviorSpecification.Disabled {
internal class ReloadVimRc : DumbAwareAction() {
override fun update(e: AnActionEvent) {
val editor = e.getData(PlatformDataKeys.EDITOR) ?: run {
e.presentation.isEnabledAndVisible = false
@ -173,7 +172,7 @@ internal class ReloadFloatingToolbar : AbstractFloatingToolbarProvider(ACTION_GR
}
}
internal class ReloadFloatingToolbarActionGroup : DefaultActionGroup(), ActionRemoteBehaviorSpecification.Disabled {
internal class ReloadFloatingToolbarActionGroup : DefaultActionGroup() {
companion object {
const val ACTION_GROUP = "IdeaVim.ReloadVimRc.group"
}

View File

@ -20,7 +20,6 @@ import com.intellij.openapi.actionSystem.ActionUpdateThread
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.DataContext
import com.intellij.openapi.actionSystem.DefaultActionGroup
import com.intellij.openapi.actionSystem.remoting.ActionRemoteBehaviorSpecification
import com.intellij.openapi.application.impl.LaterInvocator
import com.intellij.openapi.fileTypes.PlainTextLanguage
import com.intellij.openapi.options.ShowSettingsUtil
@ -146,7 +145,7 @@ internal class VimStatusBar : StatusBarWidget, StatusBarWidget.IconPresentation
override fun getPresentation(): StatusBarWidget.WidgetPresentation = this
}
internal class VimActions : DumbAwareAction(), ActionRemoteBehaviorSpecification.Disabled {
internal class VimActions : DumbAwareAction() {
override fun actionPerformed(e: AnActionEvent) {
val project = e.project ?: return

View File

@ -11,7 +11,6 @@ package com.maddyhome.idea.vim.ui.widgets.mode
import com.intellij.ide.ui.LafManager
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.remoting.ActionRemoteBehaviorSpecification
import com.intellij.openapi.ui.DialogPanel
import com.intellij.openapi.ui.popup.JBPopup
import com.intellij.openapi.ui.popup.JBPopupFactory
@ -45,7 +44,7 @@ import javax.swing.JPanel
import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty
public class ModeWidgetPopup : AnAction(), ActionRemoteBehaviorSpecification.Disabled {
public class ModeWidgetPopup : AnAction() {
public override fun actionPerformed(e: AnActionEvent) {
val project = e.project ?: return
val popup = createPopup() ?: return

View File

@ -137,14 +137,6 @@
<xi:include href="/META-INF/includes/VimExtensions.xml" xpointer="xpointer(/idea-plugin/*)"/>
<xi:include href="/META-INF/includes/VimListeners.xml" xpointer="xpointer(/idea-plugin/*)"/>
<!--
IMPORTANT!
Please make sure that all actions added implement the ActionRemoteBehaviorSpecification.Disabled interface on your
action. This will prevent the action from flowing from a Code With Me host to the JetBrains Client
-->
<actions resource-bundle="messages.IdeaVimBundle">
<action id="VimPluginToggle" class="com.maddyhome.idea.vim.action.VimPluginToggleAction">
<add-to-group group-id="ToolsMenu" anchor="last"/>