mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2025-08-10 15:40:37 +02:00
Move some classes to vim engine
This commit is contained in:
parent
d5062944d0
commit
04ebb6077a
src/main
java/com/maddyhome/idea/vim
KeyHandler.ktVimPlugin.java
action/motion
gn
leftright
MotionColumnAction.ktMotionEndAction.ktMotionFirstColumnAction.ktMotionFirstNonSpaceAction.ktMotionFirstScreenColumnAction.ktMotionFirstScreenNonSpaceAction.ktMotionLastColumnAction.ktMotionLastMatchCharAction.ktMotionLastMatchCharReverseAction.ktMotionLastNonSpaceAction.ktMotionLastScreenColumnAction.ktMotionLeftAction.ktMotionLeftWrapAction.ktMotionMiddleColumnAction.ktMotionRightAction.ktMotionRightWrapAction.ktTillCharacterMotion.kt
mark
MotionGotoFileMarkAction.ktMotionGotoFileMarkLineAction.ktMotionGotoMarkAction.ktMotionGotoMarkLineAction.ktMotionJumpNextAction.ktMotionJumpPreviousAction.kt
screen
search
SearchAgainNextAction.ktSearchAgainPreviousAction.ktSearchEntryFwdAction.ktSearchEntryRevAction.ktSearchWholeWordBackwardAction.ktSearchWholeWordForwardAction.ktSearchWordBackwardAction.ktSearchWordForwardAction.kt
select/motion
text
MotionBigWordEndLeftAction.ktMotionBigWordEndRightAction.ktMotionBigWordLeftAction.ktMotionBigWordRightAction.ktMotionCamelEndLeftAction.ktMotionCamelEndRightAction.ktMotionCamelLeftAction.ktMotionCamelRightAction.ktMotionMethodNextEndAction.ktMotionMethodNextStartAction.ktMotionMethodPreviousEndAction.ktMotionMethodPreviousStartAction.ktMotionNthCharacterAction.ktMotionParagraphNextAction.ktMotionParagraphPreviousAction.ktMotionSectionBackwardEndAction.ktMotionSectionBackwardStartAction.ktMotionSectionForwardEndAction.ktMotionSectionForwardStartAction.ktMotionSentenceNextEndAction.ktMotionSentenceNextStartAction.ktMotionSentencePreviousEndAction.ktMotionSentencePreviousStartAction.ktMotionUnmatchedAction.ktMotionWordEndLeftAction.ktMotionWordEndRightAction.ktMotionWordLeftAction.ktMotionWordRightAction.kt
updown
command
extension/matchit
group
handler
ChangeEditorActionHandler.ktEditorActionHandlerBase.ktMotionActionHandler.ktSpecialKeyHandlers.ktTextObjectActionHandler.ktVimActionHandler.ktVisualOperatorActionHandler.kt
helper
key
newapi
resources/dictionaries
@ -50,7 +50,7 @@ import com.maddyhome.idea.vim.key.CommandNode
|
||||
import com.maddyhome.idea.vim.key.CommandPartNode
|
||||
import com.maddyhome.idea.vim.key.KeyMapping
|
||||
import com.maddyhome.idea.vim.key.Node
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.newapi.VimActionsInitiator
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
@ -366,7 +366,7 @@ class KeyHandler {
|
||||
LOG.trace("Processing unhandled keys...")
|
||||
for (keyStroke in unhandledKeys) {
|
||||
handleKey(
|
||||
editor, keyStroke, ExecutionContext.onEditor(editor),
|
||||
editor, keyStroke, injector.executionContextManager.onEditor(editor),
|
||||
allowKeyMappings = true,
|
||||
mappingCompleted = true
|
||||
)
|
||||
|
@ -292,7 +292,7 @@ public class VimPlugin implements PersistentStateComponent<Element>, Disposable
|
||||
}
|
||||
|
||||
public static void showMode(String msg) {
|
||||
showMessage(msg);
|
||||
VimInjectorKt.getInjector().getMessages().showMode(msg);
|
||||
}
|
||||
|
||||
public static void showMessage(@Nls(capitalization = Nls.Capitalization.Sentence) @Nullable String msg) {
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.noneOfEnum
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
import java.util.*
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.noneOfEnum
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
import java.util.*
|
||||
|
@ -25,7 +25,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.helper.vimLastColumn
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -31,7 +31,7 @@ import com.maddyhome.idea.vim.helper.inInsertMode
|
||||
import com.maddyhome.idea.vim.helper.inSelectMode
|
||||
import com.maddyhome.idea.vim.helper.inVisualMode
|
||||
import com.maddyhome.idea.vim.helper.vimLastColumn
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.newapi.IjVimEditor
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
|
@ -27,7 +27,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -24,7 +24,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -23,7 +23,7 @@ import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -24,7 +24,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -32,7 +32,7 @@ import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.helper.inVisualMode
|
||||
import com.maddyhome.idea.vim.helper.isEndAllowed
|
||||
import com.maddyhome.idea.vim.helper.vimLastColumn
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -23,7 +23,7 @@ import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -23,7 +23,7 @@ import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -24,7 +24,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -28,7 +28,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.helper.inInsertMode
|
||||
import com.maddyhome.idea.vim.helper.inVisualMode
|
||||
import com.maddyhome.idea.vim.helper.vimLastColumn
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -25,7 +25,7 @@ import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -23,7 +23,7 @@ import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -23,7 +23,7 @@ import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -24,7 +24,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -28,7 +28,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.Direction
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -24,7 +24,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -24,7 +24,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -28,7 +28,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.helper.vimLine
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -28,7 +28,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.helper.vimLine
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -27,7 +27,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.Direction
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -27,7 +27,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.Direction
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -27,7 +27,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrNoMotion
|
||||
import com.maddyhome.idea.vim.helper.Direction
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -27,7 +27,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrNoMotion
|
||||
import com.maddyhome.idea.vim.helper.Direction
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -27,7 +27,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.Direction
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -27,7 +27,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.Direction
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -29,7 +29,7 @@ import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.exitSelectMode
|
||||
import com.maddyhome.idea.vim.helper.isTemplateActive
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -29,7 +29,7 @@ import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.exitSelectMode
|
||||
import com.maddyhome.idea.vim.helper.isTemplateActive
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -23,7 +23,7 @@ import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -23,7 +23,7 @@ import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -23,7 +23,7 @@ import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -23,7 +23,7 @@ import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -24,7 +24,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -24,18 +24,18 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
||||
class MotionCamelEndRightAction : MotionActionHandler.ForEachCaret() {
|
||||
override fun getOffset(
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
argument: Argument?,
|
||||
operatorArguments: OperatorArguments,
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
argument: Argument?,
|
||||
operatorArguments: OperatorArguments,
|
||||
): Motion {
|
||||
return VimPlugin.getMotion().moveCaretToNextCamelEnd(editor.ij, caret.ij, operatorArguments.count1).toMotionOrError()
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -24,7 +24,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -25,7 +25,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -25,7 +25,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -26,7 +26,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -23,7 +23,7 @@ import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -23,7 +23,7 @@ import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -27,7 +27,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -27,7 +27,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -29,7 +29,7 @@ import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.handler.NonShiftedSpecialKeyHandler
|
||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.helper.StringHelper.parseKeys
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -29,7 +29,7 @@ import com.maddyhome.idea.vim.command.MotionType
|
||||
import com.maddyhome.idea.vim.handler.NonShiftedSpecialKeyHandler
|
||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.helper.StringHelper.parseKeys
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -31,7 +31,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -28,7 +28,7 @@ import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.newapi.injector
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -24,7 +24,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -28,7 +28,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -27,7 +27,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -29,7 +29,7 @@ import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.helper.inInsertMode
|
||||
import com.maddyhome.idea.vim.helper.inVisualMode
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -28,7 +28,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -31,7 +31,7 @@ import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.handler.toMotionOrError
|
||||
import com.maddyhome.idea.vim.helper.EditorHelper
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -24,7 +24,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.toMotion
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -18,12 +18,12 @@
|
||||
|
||||
package com.maddyhome.idea.vim.command
|
||||
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||
import com.maddyhome.idea.vim.handler.Motion
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
@ -55,8 +55,7 @@ class Argument private constructor(
|
||||
context: ExecutionContext,
|
||||
argument: Argument?,
|
||||
operatorArguments: OperatorArguments
|
||||
) =
|
||||
Motion.NoMotion
|
||||
) = Motion.NoMotion
|
||||
|
||||
override val motionType: MotionType = MotionType.EXCLUSIVE
|
||||
},
|
||||
|
@ -18,12 +18,12 @@
|
||||
|
||||
package com.maddyhome.idea.vim.command
|
||||
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.handler.EditorActionHandlerBase
|
||||
import com.maddyhome.idea.vim.handler.MotionActionHandler
|
||||
import com.maddyhome.idea.vim.handler.TextObjectActionHandler
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@
|
||||
*/
|
||||
package com.maddyhome.idea.vim.command
|
||||
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.diagnostic.debug
|
||||
import com.maddyhome.idea.vim.helper.DigraphResult
|
||||
import com.maddyhome.idea.vim.helper.DigraphSequence
|
||||
@ -30,8 +30,8 @@ import com.maddyhome.idea.vim.helper.updateCaretsVisualPosition
|
||||
import com.maddyhome.idea.vim.helper.vimCommandState
|
||||
import com.maddyhome.idea.vim.key.CommandPartNode
|
||||
import com.maddyhome.idea.vim.newapi.VimActionsInitiator
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
import com.maddyhome.idea.vim.newapi.injector
|
||||
import com.maddyhome.idea.vim.newapi.vimLogger
|
||||
import com.maddyhome.idea.vim.vimscript.services.OptionConstants
|
||||
import com.maddyhome.idea.vim.vimscript.services.OptionService
|
||||
@ -303,7 +303,7 @@ class CommandState private constructor(private val editor: VimEditor?) {
|
||||
|
||||
private fun doShowMode() {
|
||||
val msg = StringBuilder()
|
||||
if (VimPlugin.getOptionService().isSet(OptionService.Scope.GLOBAL, OptionConstants.showmodeName)) {
|
||||
if (injector.optionService.isSet(OptionService.Scope.GLOBAL, OptionConstants.showmodeName)) {
|
||||
msg.append(getStatusString())
|
||||
}
|
||||
if (isRecording) {
|
||||
@ -312,7 +312,7 @@ class CommandState private constructor(private val editor: VimEditor?) {
|
||||
}
|
||||
msg.append(MessageHelper.message("show.mode.recording"))
|
||||
}
|
||||
VimPlugin.showMode(msg.toString())
|
||||
injector.messages.showMode(msg.toString())
|
||||
}
|
||||
|
||||
internal fun getStatusString(): String {
|
||||
@ -391,7 +391,7 @@ class CommandState private constructor(private val editor: VimEditor?) {
|
||||
|
||||
@JvmStatic
|
||||
fun getInstance(editor: VimEditor?): CommandState {
|
||||
return if (editor == null || VimPlugin.getOptionService().isSet(OptionService.Scope.GLOBAL, OptionConstants.ideaglobalmodeName)) {
|
||||
return if (editor == null || injector.optionService.isSet(OptionService.Scope.GLOBAL, OptionConstants.ideaglobalmodeName)) {
|
||||
globalState
|
||||
} else {
|
||||
var res = editor.ij.vimCommandState
|
||||
@ -404,7 +404,7 @@ class CommandState private constructor(private val editor: VimEditor?) {
|
||||
}
|
||||
|
||||
private fun getKeyRootNode(mappingMode: MappingMode): CommandPartNode<VimActionsInitiator> {
|
||||
return VimPlugin.getKey().getKeyRoot(mappingMode)
|
||||
return injector.keyGroup.getKeyRoot(mappingMode)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +48,7 @@ import com.maddyhome.idea.vim.helper.commandState
|
||||
import com.maddyhome.idea.vim.helper.enumSetOf
|
||||
import com.maddyhome.idea.vim.helper.getTopLevelEditor
|
||||
import com.maddyhome.idea.vim.helper.vimForEachCaret
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
|
@ -43,6 +43,7 @@ import com.intellij.psi.util.PsiUtilBase;
|
||||
import com.intellij.util.ObjectUtils;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.maddyhome.idea.vim.*;
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext;
|
||||
import com.maddyhome.idea.vim.api.VimEditor;
|
||||
import com.maddyhome.idea.vim.command.*;
|
||||
import com.maddyhome.idea.vim.common.IndentConfig;
|
||||
@ -896,7 +897,7 @@ public class ChangeGroup implements VimChangeGroup {
|
||||
|
||||
private void type(@NotNull VimEditor vimEditor, @NotNull ExecutionContext context, char key) {
|
||||
Editor editor = ((IjVimEditor)vimEditor).getEditor();
|
||||
DataContext ijContext = ExecutionContextKt.getIj(context);
|
||||
DataContext ijContext = IjExecutionContextKt.getIj(context);
|
||||
final Document doc = editor.getDocument();
|
||||
CommandProcessor.getInstance().executeCommand(editor.getProject(), () -> ApplicationManager.getApplication()
|
||||
.runWriteAction(() -> KeyHandlerKeeper.getInstance().getOriginalHandler().execute(editor, key, ijContext)), "", doc,
|
||||
@ -916,7 +917,7 @@ public class ChangeGroup implements VimChangeGroup {
|
||||
KeyHandler.getInstance().reset(editor);
|
||||
|
||||
if (isPrintableChar(key.getKeyChar()) || activeTemplateWithLeftRightMotion(((IjVimEditor)editor).getEditor(), key)) {
|
||||
DataContext ijContext = ExecutionContextKt.getIj(context);
|
||||
DataContext ijContext = IjExecutionContextKt.getIj(context);
|
||||
VimPlugin.getChange().insertBeforeCursor(((IjVimEditor)editor).getEditor(), ijContext);
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ package com.maddyhome.idea.vim.group;
|
||||
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.maddyhome.idea.vim.command.Command;
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext;
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext;
|
||||
import com.maddyhome.idea.vim.api.VimEditor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
|
@ -32,7 +32,7 @@ import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.helper.vimChangeActionSwitchMode
|
||||
import com.maddyhome.idea.vim.helper.vimLastColumn
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
@ -77,11 +77,11 @@ sealed class ChangeEditorActionHandler : EditorActionHandlerBase(false) {
|
||||
}
|
||||
|
||||
final override fun baseExecute(
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
cmd: Command,
|
||||
operatorArguments: OperatorArguments,
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
cmd: Command,
|
||||
operatorArguments: OperatorArguments,
|
||||
): Boolean {
|
||||
// Here we have to save the last changed command. This should be done separately for each
|
||||
// call of the task, not for each caret. Currently there is no way to schedule any action
|
||||
|
@ -18,7 +18,9 @@
|
||||
|
||||
package com.maddyhome.idea.vim.handler
|
||||
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.command.Argument
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.command.CommandFlags
|
||||
@ -26,9 +28,7 @@ import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.helper.StringHelper
|
||||
import com.maddyhome.idea.vim.helper.commandState
|
||||
import com.maddyhome.idea.vim.helper.noneOfEnum
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.injector
|
||||
import com.maddyhome.idea.vim.newapi.vimLogger
|
||||
import org.jetbrains.annotations.NonNls
|
||||
import java.util.*
|
||||
@ -68,11 +68,11 @@ abstract class EditorActionHandlerBase(private val myRunForEachCaret: Boolean) {
|
||||
open val flags: EnumSet<CommandFlags> = noneOfEnum()
|
||||
|
||||
abstract fun baseExecute(
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
cmd: Command,
|
||||
operatorArguments: OperatorArguments,
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
cmd: Command,
|
||||
operatorArguments: OperatorArguments,
|
||||
): Boolean
|
||||
|
||||
fun execute(editor: VimEditor, context: ExecutionContext, operatorArguments: OperatorArguments) {
|
||||
@ -85,16 +85,21 @@ abstract class EditorActionHandlerBase(private val myRunForEachCaret: Boolean) {
|
||||
}
|
||||
|
||||
private fun doExecute(editor: VimEditor, caret: VimCaret, context: ExecutionContext, operatorArguments: OperatorArguments) {
|
||||
if (!VimPlugin.isEnabled()) return
|
||||
if (!injector.enabler.isEnabled()) return
|
||||
|
||||
logger.debug("Execute command with handler: " + this.javaClass.name)
|
||||
|
||||
val cmd = editor.commandState.executingCommand ?: run {
|
||||
VimPlugin.indicateError()
|
||||
injector.messages.indicateError()
|
||||
return
|
||||
}
|
||||
|
||||
if (!baseExecute(editor, caret, ExecutionContext.onCaret(caret, context), cmd, operatorArguments)) VimPlugin.indicateError()
|
||||
if (!baseExecute(editor,
|
||||
caret,
|
||||
injector.executionContextManager.onCaret(caret, context),
|
||||
cmd,
|
||||
operatorArguments)
|
||||
) injector.messages.indicateError()
|
||||
}
|
||||
|
||||
open fun process(cmd: Command) {
|
||||
|
@ -22,6 +22,9 @@ import com.intellij.openapi.diagnostic.logger
|
||||
import com.intellij.openapi.editor.event.CaretEvent
|
||||
import com.intellij.openapi.editor.event.CaretListener
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.command.Argument
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.command.CommandFlags
|
||||
@ -33,9 +36,6 @@ import com.maddyhome.idea.vim.helper.inBlockSubMode
|
||||
import com.maddyhome.idea.vim.helper.inVisualMode
|
||||
import com.maddyhome.idea.vim.helper.isEndAllowed
|
||||
import com.maddyhome.idea.vim.helper.vimSelectionStart
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
import com.maddyhome.idea.vim.newapi.vim
|
||||
|
||||
@ -62,11 +62,11 @@ sealed class MotionActionHandler : EditorActionHandlerBase(false) {
|
||||
* The method executes only once it there is block selection.
|
||||
*/
|
||||
abstract fun getOffset(
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
argument: Argument?,
|
||||
operatorArguments: OperatorArguments,
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
argument: Argument?,
|
||||
operatorArguments: OperatorArguments,
|
||||
): Motion
|
||||
|
||||
/**
|
||||
@ -103,10 +103,10 @@ sealed class MotionActionHandler : EditorActionHandlerBase(false) {
|
||||
* called 1 time.
|
||||
*/
|
||||
abstract fun getOffset(
|
||||
editor: VimEditor,
|
||||
context: ExecutionContext,
|
||||
argument: Argument?,
|
||||
operatorArguments: OperatorArguments
|
||||
editor: VimEditor,
|
||||
context: ExecutionContext,
|
||||
argument: Argument?,
|
||||
operatorArguments: OperatorArguments
|
||||
): Motion
|
||||
|
||||
/**
|
||||
@ -135,11 +135,11 @@ sealed class MotionActionHandler : EditorActionHandlerBase(false) {
|
||||
final override val type: Command.Type = Command.Type.MOTION
|
||||
|
||||
fun getHandlerOffset(
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
argument: Argument?,
|
||||
operatorArguments: OperatorArguments,
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
argument: Argument?,
|
||||
operatorArguments: OperatorArguments,
|
||||
): Motion {
|
||||
return when (this) {
|
||||
is SingleExecution -> getOffset(editor, context, argument, operatorArguments)
|
||||
@ -148,11 +148,11 @@ sealed class MotionActionHandler : EditorActionHandlerBase(false) {
|
||||
}
|
||||
|
||||
final override fun baseExecute(
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
cmd: Command,
|
||||
operatorArguments: OperatorArguments,
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
cmd: Command,
|
||||
operatorArguments: OperatorArguments,
|
||||
): Boolean {
|
||||
val blockSubmodeActive = editor.ij.inBlockSubMode
|
||||
|
||||
@ -212,11 +212,11 @@ sealed class MotionActionHandler : EditorActionHandlerBase(false) {
|
||||
}
|
||||
|
||||
private fun doExecuteForEach(
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
cmd: Command,
|
||||
operatorArguments: OperatorArguments
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
cmd: Command,
|
||||
operatorArguments: OperatorArguments
|
||||
) {
|
||||
this as ForEachCaret
|
||||
if (!preOffsetComputation(editor, caret, context, cmd)) return
|
||||
|
@ -30,7 +30,7 @@ import com.maddyhome.idea.vim.helper.exitSelectMode
|
||||
import com.maddyhome.idea.vim.helper.exitVisualMode
|
||||
import com.maddyhome.idea.vim.helper.inSelectMode
|
||||
import com.maddyhome.idea.vim.helper.inVisualMode
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
@ -124,11 +124,11 @@ abstract class ShiftedArrowKeyHandler : VimActionHandler.SingleExecution() {
|
||||
*/
|
||||
abstract class NonShiftedSpecialKeyHandler : MotionActionHandler.ForEachCaret() {
|
||||
final override fun getOffset(
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
argument: Argument?,
|
||||
operatorArguments: OperatorArguments,
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
argument: Argument?,
|
||||
operatorArguments: OperatorArguments,
|
||||
): Motion {
|
||||
val keymodel = (VimPlugin.getOptionService()
|
||||
.getOptionValue(OptionService.Scope.GLOBAL, OptionConstants.keymodelName) as VimString).value.split(",")
|
||||
|
@ -35,7 +35,7 @@ import com.maddyhome.idea.vim.helper.endOffsetInclusive
|
||||
import com.maddyhome.idea.vim.helper.inVisualMode
|
||||
import com.maddyhome.idea.vim.helper.subMode
|
||||
import com.maddyhome.idea.vim.helper.vimSelectionStart
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
@ -71,11 +71,11 @@ abstract class TextObjectActionHandler : EditorActionHandlerBase(true) {
|
||||
* This code is called when user executes text object in visual mode. E.g. `va(a(a(`
|
||||
*/
|
||||
final override fun baseExecute(
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
cmd: Command,
|
||||
operatorArguments: OperatorArguments,
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
cmd: Command,
|
||||
operatorArguments: OperatorArguments,
|
||||
): Boolean {
|
||||
if (!editor.ij.inVisualMode) return true
|
||||
|
||||
|
@ -23,7 +23,7 @@ import com.intellij.openapi.editor.Caret
|
||||
import com.intellij.openapi.editor.Editor
|
||||
import com.maddyhome.idea.vim.command.Command
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
@ -66,11 +66,11 @@ sealed class VimActionHandler(myRunForEachCaret: Boolean) : EditorActionHandlerB
|
||||
}
|
||||
|
||||
final override fun baseExecute(
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
cmd: Command,
|
||||
operatorArguments: OperatorArguments
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
cmd: Command,
|
||||
operatorArguments: OperatorArguments
|
||||
): Boolean {
|
||||
return when (this) {
|
||||
is ForEachCaret -> execute(editor.ij, caret.ij, context.ij, cmd, operatorArguments)
|
||||
|
@ -48,7 +48,7 @@ import com.maddyhome.idea.vim.helper.vimLastColumn
|
||||
import com.maddyhome.idea.vim.helper.vimLastSelectionType
|
||||
import com.maddyhome.idea.vim.helper.vimLastVisualOperatorRange
|
||||
import com.maddyhome.idea.vim.helper.vimSelectionStart
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
@ -132,11 +132,11 @@ sealed class VisualOperatorActionHandler : EditorActionHandlerBase(false) {
|
||||
}
|
||||
|
||||
final override fun baseExecute(
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
cmd: Command,
|
||||
operatorArguments: OperatorArguments
|
||||
editor: VimEditor,
|
||||
caret: VimCaret,
|
||||
context: ExecutionContext,
|
||||
cmd: Command,
|
||||
operatorArguments: OperatorArguments
|
||||
): Boolean {
|
||||
logger.info("Execute visual command $cmd")
|
||||
|
||||
|
@ -38,7 +38,7 @@ import com.intellij.openapi.ui.popup.JBPopupFactory
|
||||
import com.intellij.openapi.util.NlsContexts
|
||||
import com.maddyhome.idea.vim.command.OperatorArguments
|
||||
import com.maddyhome.idea.vim.handler.EditorActionHandlerBase
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.newapi.IjNativeAction
|
||||
import com.maddyhome.idea.vim.newapi.NativeAction
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
@ -74,10 +74,10 @@ interface VimActionExecutor {
|
||||
fun executeEsc(context: ExecutionContext): Boolean
|
||||
|
||||
fun executeVimAction(
|
||||
editor: VimEditor,
|
||||
cmd: EditorActionHandlerBase,
|
||||
context: ExecutionContext,
|
||||
operatorArguments: OperatorArguments,
|
||||
editor: VimEditor,
|
||||
cmd: EditorActionHandlerBase,
|
||||
context: ExecutionContext,
|
||||
operatorArguments: OperatorArguments,
|
||||
)
|
||||
}
|
||||
|
||||
@ -149,10 +149,10 @@ class IjActionExecutor : VimActionExecutor {
|
||||
}
|
||||
|
||||
override fun executeVimAction(
|
||||
editor: VimEditor,
|
||||
cmd: EditorActionHandlerBase,
|
||||
context: ExecutionContext,
|
||||
operatorArguments: OperatorArguments,
|
||||
editor: VimEditor,
|
||||
cmd: EditorActionHandlerBase,
|
||||
context: ExecutionContext,
|
||||
operatorArguments: OperatorArguments,
|
||||
) {
|
||||
CommandProcessor.getInstance()
|
||||
.executeCommand(editor.ij.project,
|
||||
|
@ -25,12 +25,14 @@ import com.maddyhome.idea.vim.action.change.VimRepeater.Extension.argumentCaptur
|
||||
import com.maddyhome.idea.vim.action.change.VimRepeater.Extension.clean
|
||||
import com.maddyhome.idea.vim.action.change.VimRepeater.Extension.lastExtensionHandler
|
||||
import com.maddyhome.idea.vim.action.change.VimRepeater.repeatHandler
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.command.Argument
|
||||
import com.maddyhome.idea.vim.command.CommandState
|
||||
import com.maddyhome.idea.vim.command.SelectionType
|
||||
import com.maddyhome.idea.vim.command.SelectionType.Companion.fromSubMode
|
||||
import com.maddyhome.idea.vim.common.Offset
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.common.offset
|
||||
import com.maddyhome.idea.vim.extension.VimExtensionHandler
|
||||
import com.maddyhome.idea.vim.group.visual.VimSelection
|
||||
@ -42,8 +44,6 @@ import com.maddyhome.idea.vim.helper.commandState
|
||||
import com.maddyhome.idea.vim.helper.subMode
|
||||
import com.maddyhome.idea.vim.helper.vimSelectionStart
|
||||
import com.maddyhome.idea.vim.listener.SelectionVimListenerSuppressor
|
||||
import com.maddyhome.idea.vim.newapi.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.newapi.ij
|
||||
import com.maddyhome.idea.vim.newapi.injector
|
||||
import com.maddyhome.idea.vim.newapi.vim
|
||||
@ -103,7 +103,7 @@ class ToKeysMappingInfo(
|
||||
|
||||
override fun execute(editor: VimEditor, context: ExecutionContext) {
|
||||
LOG.debug("Executing 'ToKeys' mapping info...")
|
||||
val editorDataContext = ExecutionContext.onEditor(editor, context)
|
||||
val editorDataContext = injector.executionContextManager.onEditor(editor, context)
|
||||
val fromIsPrefix = KeyHandler.isPrefix(fromKeys, toKeys)
|
||||
var first = true
|
||||
for (keyStroke in toKeys) {
|
||||
@ -130,7 +130,7 @@ class ToExpressionMappingInfo(
|
||||
|
||||
override fun execute(editor: VimEditor, context: ExecutionContext) {
|
||||
LOG.debug("Executing 'ToExpression' mapping info...")
|
||||
val editorDataContext = ExecutionContext.onEditor(editor, context)
|
||||
val editorDataContext = injector.executionContextManager.onEditor(editor, context)
|
||||
val toKeys = parseKeys(toExpression.evaluate(editor.ij, context.ij, CommandLineVimLContext).toString())
|
||||
val fromIsPrefix = KeyHandler.isPrefix(fromKeys, toKeys)
|
||||
var first = true
|
||||
@ -256,7 +256,7 @@ class ToActionMappingInfo(
|
||||
|
||||
override fun execute(editor: VimEditor, context: ExecutionContext) {
|
||||
LOG.debug("Executing 'ToAction' mapping...")
|
||||
val editorDataContext = ExecutionContext.onEditor(editor, context)
|
||||
val editorDataContext = injector.executionContextManager.onEditor(editor, context)
|
||||
val dataContext = CaretSpecificDataContext(editorDataContext.ij, editor.ij.caretModel.currentCaret)
|
||||
injector.actionExecutor.executeAction(action, dataContext.vim)
|
||||
}
|
||||
|
@ -19,35 +19,10 @@
|
||||
package com.maddyhome.idea.vim.newapi
|
||||
|
||||
import com.intellij.openapi.actionSystem.DataContext
|
||||
import com.intellij.openapi.editor.actionSystem.CaretSpecificDataContext
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.helper.EditorDataContext
|
||||
|
||||
/**
|
||||
* This would be ideal if we could provide a typed solution, but sofar this is just a holder
|
||||
*/
|
||||
|
||||
interface ExecutionContext {
|
||||
val context: Any
|
||||
|
||||
// TODO: 10.02.2022 Not sure about this method
|
||||
fun updateEditor(editor: VimEditor): ExecutionContext
|
||||
|
||||
companion object {
|
||||
fun onEditor(editor: VimEditor, prevContext: ExecutionContext? = null): ExecutionContext {
|
||||
return IjExecutionContext(EditorDataContext.init((editor as IjVimEditor).editor, prevContext?.ij))
|
||||
}
|
||||
|
||||
fun onCaret(caret: VimCaret, prevContext: ExecutionContext): ExecutionContext {
|
||||
return IjExecutionContext(CaretSpecificDataContext(prevContext.ij, caret.ij))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val ExecutionContext.ij: DataContext
|
||||
get() = (this as IjExecutionContext).context
|
||||
|
||||
class IjExecutionContext(override val context: DataContext) : ExecutionContext {
|
||||
override fun updateEditor(editor: VimEditor): ExecutionContext {
|
||||
return IjExecutionContext(EditorDataContext.init((editor as IjVimEditor).editor, context))
|
||||
@ -56,3 +31,7 @@ class IjExecutionContext(override val context: DataContext) : ExecutionContext {
|
||||
|
||||
val DataContext.vim
|
||||
get() = IjExecutionContext(this)
|
||||
|
||||
val ExecutionContext.ij: DataContext
|
||||
get() = (this as IjExecutionContext).context
|
||||
|
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||
* Copyright (C) 2003-2022 The IdeaVim authors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.maddyhome.idea.vim.newapi
|
||||
|
||||
import com.intellij.openapi.editor.actionSystem.CaretSpecificDataContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
import com.maddyhome.idea.vim.api.ExecutionContextManager
|
||||
import com.maddyhome.idea.vim.api.VimCaret
|
||||
import com.maddyhome.idea.vim.api.VimEditor
|
||||
import com.maddyhome.idea.vim.helper.EditorDataContext
|
||||
|
||||
class IjExecutionContextManager : ExecutionContextManager {
|
||||
override fun onEditor(editor: VimEditor, prevContext: ExecutionContext?): ExecutionContext {
|
||||
return IjExecutionContext(EditorDataContext.init((editor as IjVimEditor).editor, prevContext?.ij))
|
||||
}
|
||||
|
||||
override fun onCaret(caret: VimCaret, prevContext: ExecutionContext): ExecutionContext {
|
||||
return IjExecutionContext(CaretSpecificDataContext(prevContext.ij, caret.ij))
|
||||
}
|
||||
}
|
28
src/main/java/com/maddyhome/idea/vim/newapi/IjVimEnabler.kt
Normal file
28
src/main/java/com/maddyhome/idea/vim/newapi/IjVimEnabler.kt
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* IdeaVim - Vim emulator for IDEs based on the IntelliJ platform
|
||||
* Copyright (C) 2003-2022 The IdeaVim authors
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.maddyhome.idea.vim.newapi
|
||||
|
||||
import com.maddyhome.idea.vim.VimPlugin
|
||||
import com.maddyhome.idea.vim.api.VimEnabler
|
||||
|
||||
class IjVimEnabler : VimEnabler {
|
||||
override fun isEnabled(): Boolean {
|
||||
return VimPlugin.isEnabled()
|
||||
}
|
||||
}
|
@ -21,6 +21,7 @@ package com.maddyhome.idea.vim.newapi
|
||||
import com.intellij.openapi.actionSystem.ActionManager
|
||||
import com.intellij.openapi.actionSystem.AnAction
|
||||
import com.intellij.openapi.actionSystem.IdeActions
|
||||
import com.maddyhome.idea.vim.api.ExecutionContext
|
||||
|
||||
interface NativeAction {
|
||||
val action: Any
|
||||
|
@ -21,8 +21,10 @@ package com.maddyhome.idea.vim.newapi
|
||||
import com.intellij.openapi.components.service
|
||||
import com.intellij.openapi.components.serviceIfCreated
|
||||
import com.intellij.openapi.diagnostic.Logger
|
||||
import com.maddyhome.idea.vim.common.VimMachine
|
||||
import com.maddyhome.idea.vim.api.ExecutionContextManager
|
||||
import com.maddyhome.idea.vim.api.VimEnabler
|
||||
import com.maddyhome.idea.vim.api.VimMessages
|
||||
import com.maddyhome.idea.vim.common.VimMachine
|
||||
import com.maddyhome.idea.vim.diagnostic.VimLogger
|
||||
import com.maddyhome.idea.vim.group.VimChangeGroup
|
||||
import com.maddyhome.idea.vim.group.VimKeyGroup
|
||||
@ -43,9 +45,12 @@ interface VimInjector {
|
||||
val processGroup: VimProcessGroup
|
||||
val keyGroup: VimKeyGroup
|
||||
val application: VimApplication
|
||||
val executionContextManager: ExecutionContextManager
|
||||
|
||||
val vimMachine: VimMachine
|
||||
|
||||
val enabler: VimEnabler
|
||||
|
||||
// TODO We should somehow state that [OptionServiceImpl] can be used from any implementation
|
||||
val optionService: OptionService
|
||||
}
|
||||
@ -68,7 +73,9 @@ class IjVimInjector : VimInjector {
|
||||
override val keyGroup: VimKeyGroup
|
||||
get() = service()
|
||||
override val application: VimApplication = IjVimApplication()
|
||||
override val executionContextManager: ExecutionContextManager = IjExecutionContextManager()
|
||||
override val vimMachine: VimMachine = VimMachineImpl()
|
||||
override val enabler: VimEnabler = IjVimEnabler()
|
||||
|
||||
override val optionService: OptionService
|
||||
get() = service()
|
||||
|
@ -1,6 +1,6 @@
|
||||
ideavim
|
||||
ideavimrc
|
||||
|
||||
maddyhome
|
||||
|
||||
gdefault
|
||||
guicursor
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user