mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
[inline-completion] ML-3303: replace custom direct call actions with the platform one, and assign shortcut to it
GitOrigin-RevId: 6aa71843374a84e1f62e775817779398b40406ce
This commit is contained in:
committed by
intellij-monorepo-bot
parent
62438e2602
commit
49aae6f4f4
@@ -11,6 +11,8 @@ private class InlineCompletionActionsPromoter : ActionPromoter {
|
||||
override fun promote(actions: List<AnAction>, context: DataContext): List<AnAction> {
|
||||
val editor = CommonDataKeys.EDITOR.getData(context) ?: return emptyList()
|
||||
|
||||
actions.filterIsInstance<CallInlineCompletionAction>().takeIf { it.isNotEmpty() }?.let { return it }
|
||||
|
||||
if (InlineCompletionContext.getOrNull(editor) == null) {
|
||||
return emptyList()
|
||||
}
|
||||
|
||||
@@ -501,7 +501,11 @@
|
||||
<action id="Floating.CodeToolbar.Disable" class="com.intellij.ui.codeFloatingToolbar.DisableCodeFloatingToolbarAction" />
|
||||
|
||||
<group id="InlineCompletion" popup="true">
|
||||
<action id="CallInlineCompletionAction" class="com.intellij.codeInsight.inline.completion.CallInlineCompletionAction"/>
|
||||
<action id="CallInlineCompletionAction" class="com.intellij.codeInsight.inline.completion.CallInlineCompletionAction">
|
||||
<keyboard-shortcut first-keystroke="alt BACK_SLASH" keymap="$default"/>
|
||||
<keyboard-shortcut first-keystroke="alt SLASH" keymap="Visual Studio" replace-all="true"/>
|
||||
<keyboard-shortcut first-keystroke="alt SLASH" keymap="Visual Studio OSX" replace-all="true"/>
|
||||
</action>
|
||||
<action id="InsertInlineCompletionAction" class="com.intellij.codeInsight.inline.completion.InsertInlineCompletionAction">
|
||||
<keyboard-shortcut first-keystroke="TAB" keymap="$default"/>
|
||||
</action>
|
||||
@@ -539,6 +543,7 @@
|
||||
<action id="HippieCompletion" class="com.intellij.codeInsight.completion.actions.HippieCompletionAction"/>
|
||||
<action id="HippieBackwardCompletion" class="com.intellij.codeInsight.completion.actions.HippieBackwardCompletionAction"/>
|
||||
<separator/>
|
||||
<reference ref="CallInlineCompletionAction"/>
|
||||
<reference ref="InsertInlineCompletionAction"/>
|
||||
</group>
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ public abstract class KeymapsTestCase extends KeymapsTestCaseBase {
|
||||
{"shift ctrl alt M", "Console.TableResult.MaximizeEditingCell", "FullLine.GenerateMarkerAction"},
|
||||
{"ctrl alt N", "Console.TableResult.SetNull", "Git.New.Branch.In.Log", "GitNewBranchAction", "Inline"},
|
||||
{"ctrl BACK_SLASH", "AIAssistant.Editor.GenerateCodeInplace", "FileChooser.GoToRoot"},
|
||||
{"alt BACK_SLASH", "AIAssistant.Editor.CompleteCodeWithAI", "MLCompletion.DirectCall", "MainMenuButton.ShowMenu"},
|
||||
{"alt BACK_SLASH", "CallInlineCompletionAction", "MainMenuButton.ShowMenu"},
|
||||
}),
|
||||
Map.entry("Mac OS X 10.5+", new String[][]{
|
||||
{"BACK_SPACE", "$Delete", "EditorBackSpace"},
|
||||
@@ -275,7 +275,7 @@ public abstract class KeymapsTestCase extends KeymapsTestCaseBase {
|
||||
{"shift ctrl MINUS", "$Undo", "NotebookSplitCellAction"},
|
||||
}),
|
||||
Map.entry("Visual Studio", new String[][]{
|
||||
{"alt BACK_SLASH", "AIAssistant.Editor.CompleteCodeWithAI", "MLCompletion.DirectCall", "FileStructurePopup"},
|
||||
{"alt BACK_SLASH", "CallInlineCompletionAction", "FileStructurePopup"},
|
||||
{"F5", "Graph.RouteEdges", "Resume", "WebInspector.Browser.Refresh"},
|
||||
{"F7", "CompileDirty", "NextDiff"},
|
||||
{"F12", "GotoDeclaration", "WebInspector.Browser.Selection.Toggle"},
|
||||
@@ -319,14 +319,14 @@ public abstract class KeymapsTestCase extends KeymapsTestCaseBase {
|
||||
{"shift ctrl alt P", "IntroduceFunctionalParameter", "ReformatWithPrettierAction", "VcsShowPrevChangeMarker"},
|
||||
{"shift ctrl alt UP", "MoveStatementUp", "ResizeToolWindowUp"},
|
||||
{"ctrl SLASH", "AIAssistant.Editor.GenerateCodeInplace", "Graph.ActualSize"},
|
||||
{"alt SLASH", "AIAssistant.Editor.CompleteCodeWithAI", "MLCompletion.DirectCall", "HippieCompletion"},
|
||||
{"alt SLASH", "CallInlineCompletionAction", "HippieCompletion"},
|
||||
{"F8", "NextOccurence", "NextDiff"},
|
||||
{"shift F8", "PreviousOccurence", "PreviousDiff"},
|
||||
}),
|
||||
Map.entry("Visual Studio OSX", new String[][]{
|
||||
{"F12", "GotoDeclaration", "WebInspector.Browser.Selection.Toggle"},
|
||||
{"meta L", "$Cut", "Terminal.ClearBuffer"},
|
||||
{"alt BACK_SLASH", "AIAssistant.Editor.CompleteCodeWithAI", "MLCompletion.DirectCall", "FileStructurePopup"},
|
||||
{"alt BACK_SLASH", "CallInlineCompletionAction", "FileStructurePopup"},
|
||||
{"alt DELETE", "EditorDeleteToWordEnd", "SafeDelete"},
|
||||
{"shift ctrl RIGHT", "Diff.NextChange", "EditorRightWithSelection"},
|
||||
{"meta F10", "RunToCursor", "UpdateRunningApplication"},
|
||||
@@ -361,7 +361,7 @@ public abstract class KeymapsTestCase extends KeymapsTestCaseBase {
|
||||
{"meta R", "SECOND_STROKE_SHORTCUT", "org.jetbrains.plugins.ruby.rails.console.ReloadSources"},
|
||||
{"meta E", "SECOND_STROKE_SHORTCUT", "SwitcherIterateItems", "SwitcherRecentEditedChangedToggleCheckBox"},
|
||||
{"meta T", "SearchEverywhere", "Terminal.NewTab"},
|
||||
{"alt SLASH", "AIAssistant.Editor.CompleteCodeWithAI", "MLCompletion.DirectCall", "HippieCompletion"},
|
||||
{"alt SLASH", "CallInlineCompletionAction", "HippieCompletion"},
|
||||
}),
|
||||
Map.entry("Default for XWin", new String[][]{
|
||||
{"ctrl SLASH", "CommentByLineComment", "FileChooser.GoToRoot", "Graph.ActualSize"},
|
||||
|
||||
Reference in New Issue
Block a user