mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-131439 Description of some items in Preferences -> Keymap reads internal ids rather than human-readable name
This commit is contained in:
@@ -497,7 +497,7 @@ public class ActionsTree {
|
||||
else if (userObject instanceof String) {
|
||||
String actionId = (String)userObject;
|
||||
bound = myShowBoundActions && ((KeymapImpl)myKeymap).isActionBound(actionId);
|
||||
AnAction action = ActionManager.getInstance().getActionOrStub(actionId);
|
||||
AnAction action = ActionManager.getInstance().getAction(actionId);
|
||||
if (action != null) {
|
||||
text = action.getTemplatePresentation().getText();
|
||||
if (text == null || text.length() == 0) { //fill dynamic presentation gaps
|
||||
|
||||
@@ -90,6 +90,8 @@ action.EditorUpWithSelection.text=Up with Selection
|
||||
action.EditorDownWithSelection.text=Down with Selection
|
||||
action.EditorLeftWithSelection.text=Left with Selection
|
||||
action.EditorRightWithSelection.text=Right with Selection
|
||||
action.EditorLookupUp.text=Lookup Up
|
||||
action.EditorLookupDown.text=Lookup Down
|
||||
action.EditorIndentSelection.text=Indent Selection
|
||||
action.EditorUnindentSelection.text=Unindent Line or Selection
|
||||
action.EditorIndentLineOrSelection.text=Indent Line or Selection
|
||||
@@ -448,6 +450,7 @@ action.GotoFile.text=_File...
|
||||
action.GotoFile.description=Quickly navigate to a file by name
|
||||
action.GotoSymbol.text=_Symbol...
|
||||
action.GotoSymbol.description=Quickly navigate to any symbol by name
|
||||
action.GotoCustomRegion.text=Custom Folding...
|
||||
action.GotoAction.text=F_ind Action...
|
||||
action.GotoAction.description=Quickly navigate to action by name
|
||||
action.GotoLine.text=_Line...
|
||||
@@ -517,6 +520,7 @@ action.ClassNameCompletion.text=Class _Name Completion
|
||||
action.ClassNameCompletion.description=Complete class name and add import for it
|
||||
action.InsertLiveTemplate.text=Insert Live _Template...
|
||||
action.InsertLiveTemplate.description=Show popup list of live templates starting with the specified prefix
|
||||
action.ExpandLiveTemplateByTab.text=Expand Live Template by Tab
|
||||
action.ExpandLiveTemplateCustom.text=Expand Live Template
|
||||
action.ExpandLiveTemplateCustom.description=Invoke the live template with the prefix typed in the editor
|
||||
action.SurroundWithLiveTemplate.text=Surround with Live Tem_plate...
|
||||
@@ -680,6 +684,7 @@ action.ForceRunToCursor.text=Force Run to Cur_sor
|
||||
action.ForceRunToCursor.description=Run to the line where the caret is, ignoring any breakpoints
|
||||
action.Debugger.PopFrame.text=Drop _Frame
|
||||
action.Debugger.PopFrame.description=Moves execution point back to the method call dropping current method frames from the stack
|
||||
action.Debugger.ShowLibraryFrames.text=Show/Hide Library Frames
|
||||
action.Pause.text=_Pause Program
|
||||
action.Pause.description=Suspend program execution and enable debugging
|
||||
action.Resume.text=Resume Pro_gram
|
||||
@@ -1018,6 +1023,7 @@ action.MoveEditorToOppositeTabGroup.text=_Move To Opposite Group
|
||||
action.MoveEditorToOppositeTabGroup.description=Move editor to opposite tab group
|
||||
action.OpenEditorInOppositeTabGroup.text=_Open In Opposite Group
|
||||
action.OpenEditorInOppositeTabGroup.description=Open a copy of this editor in the opposite tab group
|
||||
action.OpenModuleSettings.text=Module Settings
|
||||
action.ModuleSettings.text=Module _Settings
|
||||
action.ModuleSettings.description=Open settings dialog for selected module
|
||||
group.MoveModuleToGroup.text=Move Module to Group
|
||||
@@ -1326,6 +1332,7 @@ action.ShelvedChanges.ShowHideDeleted.text=Show/Hide Applied Shelved Changes
|
||||
action.XDebugger.MuteBreakpoints.text=Mute Breakpoints
|
||||
action.ShelvedChanges.DeleteDeleted.text=Delete Applied Shelved Changes
|
||||
action.Diff.IgnoreWhitespace.text=Toggle Diff Ignore Whitespace
|
||||
action.Diff.HighlightMode.text=Toggle Diff Highlight Mode
|
||||
action.ShelvedChanges.Restore.text=Restore Applied Shelved Change
|
||||
action.Graph.Current.Node.Dependencies.Filter.text=Show selected nodes with dependencies
|
||||
group.VcsToobarActions.text=VCS Actions
|
||||
@@ -1352,6 +1359,7 @@ group.ToolsBasicGroup.description=Tools Basic Group
|
||||
group.ToolbarNewElement.text=Toolbar New Element Group
|
||||
action.NewElementToolbarAction.text=Create New File
|
||||
action.ShowRegistry.text=Registry
|
||||
action.UiDebugger.text=UI Debugger
|
||||
action.ExportTestResults.text=Export Test Results...
|
||||
action.ExportTestResults.description=Export test results to the file
|
||||
action.TogglePowerSave.text=Power Save Mode
|
||||
@@ -1382,6 +1390,7 @@ action.MarkAsOriginalTypeAction.text=Mark as
|
||||
|
||||
action.Console.Execute.text=Execute Current Statement
|
||||
action.Console.Execute.description=Execute current statement in console
|
||||
action.Console.SplitLine.text=Split Line
|
||||
action.Console.History.Previous.text=Previous history entry
|
||||
action.Console.History.Previous.description=Previous console history entry
|
||||
action.Console.History.Next.text=Next history entry
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
<actions>
|
||||
|
||||
<group id="SwitchViewActions">
|
||||
<action id="SwitchUp" class="com.intellij.ui.switcher.SwitchAction$Up"/>
|
||||
<action id="SwitchDown" class="com.intellij.ui.switcher.SwitchAction$Down"/>
|
||||
<action id="SwitchLeft" class="com.intellij.ui.switcher.SwitchAction$Left"/>
|
||||
<action id="SwitchRight" class="com.intellij.ui.switcher.SwitchAction$Right"/>
|
||||
<action id="SwitchApply" class="com.intellij.ui.switcher.ApplySwitchAction"/>
|
||||
<action id="SwitchUp" text="Switching Up" class="com.intellij.ui.switcher.SwitchAction$Up"/>
|
||||
<action id="SwitchDown" text="Switching Down" class="com.intellij.ui.switcher.SwitchAction$Down"/>
|
||||
<action id="SwitchLeft" text="Switching Left" class="com.intellij.ui.switcher.SwitchAction$Left"/>
|
||||
<action id="SwitchRight" text="Switching Right" class="com.intellij.ui.switcher.SwitchAction$Right"/>
|
||||
<action id="SwitchApply" text="Switching Apply" class="com.intellij.ui.switcher.ApplySwitchAction"/>
|
||||
</group>
|
||||
|
||||
<action id="ContextHelp" class="com.intellij.ide.actions.ContextHelpAction"/>
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
<action id="TextComponent.ClearAction" class="com.intellij.ui.ClearTextAction"/>
|
||||
<action id="Switcher" class="com.intellij.ide.actions.Switcher" text="Switcher"/>
|
||||
<action id="QuickDocCopy" class="com.intellij.codeInsight.documentation.actions.CopyQuickDocAction" use-shortcut-of="$Copy"/>
|
||||
<action id="QuickDocCopy" text="Copy Quick Doc" class="com.intellij.codeInsight.documentation.actions.CopyQuickDocAction" use-shortcut-of="$Copy"/>
|
||||
<action id="EditSourceInNewWindow" class="com.intellij.ide.actions.EditSourceInNewWindowAction" />
|
||||
<action id="SearchEverywhere" class="com.intellij.ide.actions.SearchEverywhereAction" />
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
<action id="CompareDirs" class="com.intellij.openapi.diff.actions.CompareDirectoriesAction" text="Compare Directories"/>
|
||||
<action id="CompareJars" class="com.intellij.openapi.diff.actions.CompareJarsAction" text="Compare JARs" use-shortcut-of="CompareDirs"/>
|
||||
|
||||
<action id="ScrollTreeToCenter" class="com.intellij.ide.actions.ScrollTreeToCenterAction" use-shortcut-of="EditorScrollToCenter"/>
|
||||
<action id="ScrollTreeToCenter" text="Scroll to Center" class="com.intellij.ide.actions.ScrollTreeToCenterAction" use-shortcut-of="EditorScrollToCenter"/>
|
||||
|
||||
<action id="PinToolwindowTab" class="com.intellij.ui.content.tabs.PinToolwindowTabAction"/>
|
||||
|
||||
|
||||
+38
-1
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.keymap.impl.ui;
|
||||
|
||||
import com.intellij.diagnostic.PluginException;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.actionSystem.ex.QuickList;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
@@ -24,6 +25,7 @@ import com.intellij.openapi.keymap.impl.ActionShortcutRestrictions;
|
||||
import com.intellij.openapi.keymap.impl.KeymapImpl;
|
||||
import com.intellij.openapi.keymap.impl.KeymapManagerImpl;
|
||||
import com.intellij.openapi.keymap.impl.ShortcutRestrictions;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.testFramework.LightPlatformCodeInsightTestCase;
|
||||
import com.intellij.testFramework.PlatformTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -197,13 +199,48 @@ public class ActionsTreeTest extends LightPlatformCodeInsightTestCase {
|
||||
ACTION_EDITOR_DELETE_WITH_SHORTCUT), // this action is shown, since the keymap redefines the shortcut of $Delete
|
||||
Arrays.asList(
|
||||
NON_EXISTENT_ACTION,
|
||||
ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION,
|
||||
ACTION_WITH_USE_SHORTCUT_OF_EXISTENT_ACTION,
|
||||
ACTION_EDITOR_CUT_WITHOUT_SHORTCUT, // this one is not shown since bound to $cut
|
||||
ACTION_WITH_FIXED_SHORTCUTS
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public void testPresentation() {
|
||||
ActionManager manager = ActionManager.getInstance();
|
||||
for (String id : manager.getActionIds("")) {
|
||||
if (!ACTION_WITHOUT_TEXT_AND_DESCRIPTION.equals(id)) {
|
||||
try {
|
||||
AnAction stub = manager.getActionOrStub(id);
|
||||
AnAction action = manager.getAction(id);
|
||||
String message = id + " (" + action.getClass().getName() + ")";
|
||||
if (stub != action) {
|
||||
Presentation before = stub.getTemplatePresentation();
|
||||
Presentation after = action.getTemplatePresentation();
|
||||
checkPresentationProperty("icon", message, before.getIcon(), after.getIcon());
|
||||
checkPresentationProperty("text", message, before.getText(), after.getText());
|
||||
checkPresentationProperty("description", message, before.getDescription(), after.getDescription());
|
||||
}
|
||||
if (action instanceof ActionGroup) {
|
||||
System.out.println("ignored action group: " + message);
|
||||
}
|
||||
else {
|
||||
assertFalse("no text: " + message, StringUtil.isEmpty(action.getTemplatePresentation().getText()));
|
||||
}
|
||||
}
|
||||
catch (PluginException exception) {
|
||||
System.out.println(id + " ignored because " + exception.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkPresentationProperty(String name, String message, Object expected, Object actual) {
|
||||
if (!(expected == null ? actual == null : expected.equals(actual))) {
|
||||
System.out.println(name + " updated: "+ message + "; old:" + expected + "; new:" + actual);
|
||||
}
|
||||
}
|
||||
|
||||
public void testFiltering() {
|
||||
doTest("Dummy",
|
||||
// all below actions should still be present, as they contain 'Dummy' in their actionId
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
</project-components>
|
||||
|
||||
<actions>
|
||||
<action id="DissociateResourceBundleAction" class="com.intellij.lang.properties.customizeActions.DissociateResourceBundleAction">
|
||||
<action id="DissociateResourceBundleAction" text="Dissociate Resource Bundle" class="com.intellij.lang.properties.customizeActions.DissociateResourceBundleAction">
|
||||
<add-to-group group-id="ProjectViewPopupMenu"/>
|
||||
</action>
|
||||
<action id="CombinePropertiesFilesAction" class="com.intellij.lang.properties.customizeActions.CombinePropertiesFilesAction">
|
||||
|
||||
@@ -4338,6 +4338,8 @@ action.EditorUpWithSelection.text=Up with Selection
|
||||
action.EditorDownWithSelection.text=Down with Selection
|
||||
action.EditorLeftWithSelection.text=Left with Selection
|
||||
action.EditorRightWithSelection.text=Right with Selection
|
||||
action.EditorLookupUp.text=Lookup Up
|
||||
action.EditorLookupDown.text=Lookup Down
|
||||
action.EditorIndentSelection.text=Indent Selection
|
||||
action.EditorUnindentSelection.text=Unindent Selection
|
||||
action.EditorIndentLineOrSelection.text=Indent Line or Selection
|
||||
@@ -4679,6 +4681,7 @@ action.GotoFile.text=_File...
|
||||
action.GotoFile.description=Quickly navigate to a file by name
|
||||
action.GotoSymbol.text=_Symbol...
|
||||
action.GotoSymbol.description=Quickly navigate to any symbol by name
|
||||
action.GotoCustomRegion.text=Custom Folding...
|
||||
action.GotoAction.text=F_ind Action...
|
||||
action.GotoAction.description=Quickly navigate to action by name
|
||||
action.GotoLine.text=_Line...
|
||||
@@ -4746,6 +4749,7 @@ action.ClassNameCompletion.text=Class _Name Completion
|
||||
action.ClassNameCompletion.description=Complete class name and add import for it
|
||||
action.InsertLiveTemplate.text=Insert Live _Template...
|
||||
action.InsertLiveTemplate.description=Show popup list of live templates starting with the specified prefix
|
||||
action.ExpandLiveTemplateByTab.text=Expand Live Template by Tab
|
||||
action.SurroundWithLiveTemplate.text=Surround with Live Tem_plate...
|
||||
action.SurroundWithLiveTemplate.description=Surrounds the selection with one of the template
|
||||
action.CommentByLineComment.text=Comment with _Line Comment
|
||||
@@ -5231,6 +5235,7 @@ action.MoveEditorToOppositeTabGroup.text=_Move To Opposite Group
|
||||
action.MoveEditorToOppositeTabGroup.description=Move editor to opposite tab group
|
||||
action.OpenEditorInOppositeTabGroup.text=_Open In Opposite Group
|
||||
action.OpenEditorInOppositeTabGroup.description=Open a copy of this editor in the opposite tab group
|
||||
action.OpenModuleSettings.text=Module Settings
|
||||
action.ModuleSettings.text=Module _Settings
|
||||
action.ModuleSettings.description=Open settings dialog for selected module
|
||||
group.MoveModuleToGroup.text=Move Module to Group
|
||||
@@ -5563,6 +5568,7 @@ group.ToolsBasicGroup.description=Tools Basic Group
|
||||
group.ToolbarNewElement.text=Toolbar New Element Group
|
||||
action.NewElementToolbarAction.text=Create New File
|
||||
action.ShowRegistry.text=Registry
|
||||
action.UiDebugger.text=UI Debugger
|
||||
action.ExportTestResults.text=Export Test Results...
|
||||
action.ExportTestResults.description=Export test results to the file
|
||||
action.TogglePowerSave.text=Power Save Mode
|
||||
@@ -20390,6 +20396,7 @@ action.ForceRunToCursor.text=Force Run to Cur_sor
|
||||
action.ForceRunToCursor.description=Run to the line where the caret is, ignoring any breakpoints
|
||||
action.Debugger.PopFrame.text=Drop _Frame
|
||||
action.Debugger.PopFrame.description=Moves execution point back to the method call dropping current method frames from the stack
|
||||
action.Debugger.ShowLibraryFrames.text=Show/Hide Library Frames
|
||||
action.Pause.text=_Pause Program
|
||||
action.Pause.description=Suspend program execution and enable debugging
|
||||
action.Resume.text=Resume Pro_gram
|
||||
@@ -21023,6 +21030,7 @@ action.ShelvedChanges.ShowHideDeleted.text=Show/Hide Applied Shelved Changes
|
||||
action.XDebugger.MuteBreakpoints.text=Mute Breakpoints
|
||||
action.ShelvedChanges.DeleteDeleted.text=Delete Applied Shelved Changes
|
||||
action.Diff.IgnoreWhitespace.text=Toggle Diff Ignore Whitespace
|
||||
action.Diff.HighlightMode.text=Toggle Diff Highlight Mode
|
||||
action.ShelvedChanges.Restore.text=Restore Applied Shelved Change
|
||||
action.Graph.Current.Node.Dependencies.Filter.text=Show selected nodes with dependencies
|
||||
group.VcsToobarActions.text=VCS Actions
|
||||
@@ -21079,6 +21087,7 @@ action.MarkAsOriginalTypeAction.text=Mark as
|
||||
|
||||
action.Console.Execute.text=Execute Current Statement
|
||||
action.Console.Execute.description=Execute current statement in console
|
||||
action.Console.SplitLine.text=Split Line
|
||||
action.Console.History.Previous.text=Previous
|
||||
action.Console.History.Previous.description=Previous console history entry
|
||||
action.Console.History.Next.text=Next
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<action id="Subversion.BrowseSVNRepository" class="org.jetbrains.idea.svn.actions.BrowseRepositoryAction">
|
||||
<add-to-group group-id="Vcs.Browse"/>
|
||||
</action>
|
||||
<action id="Subversion.ShareWholeProject" class="org.jetbrains.idea.svn.actions.ShareWholeProject">
|
||||
<action id="Subversion.ShareWholeProject" text="Share Project (Subversion)..." class="org.jetbrains.idea.svn.actions.ShareWholeProject">
|
||||
<add-to-group group-id="Vcs.Import"/>
|
||||
</action>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user