From 7447159775fb23f9904ba96e881bc5d9ee7de034 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Fri, 1 Aug 2008 18:34:02 +0400 Subject: [PATCH] action groups cleanup work in progress --- .../openapi/actionSystem/DefaultActionGroup.java | 7 +++++-- platform-resources/src/idea/LangActions.xml | 3 ++- .../src/messages/ActionsBundle.properties | 15 ++++++++++++++- resources/src/idea/ActionManager.xml | 18 ++++++++---------- resources/src/idea/XmlActions.xml | 21 ++------------------- 5 files changed, 31 insertions(+), 33 deletions(-) diff --git a/platform-api/src/com/intellij/openapi/actionSystem/DefaultActionGroup.java b/platform-api/src/com/intellij/openapi/actionSystem/DefaultActionGroup.java index d179b85f06..2ff78dcf2d 100644 --- a/platform-api/src/com/intellij/openapi/actionSystem/DefaultActionGroup.java +++ b/platform-api/src/com/intellij/openapi/actionSystem/DefaultActionGroup.java @@ -85,10 +85,13 @@ public class DefaultActionGroup extends ActionGroup { add(action, constraint, ActionManager.getInstance()); } - public final void add(@NotNull AnAction action, @NotNull Constraints constraint, @NotNull ActionManager actionManager){ + public final void add(@NotNull AnAction action, @NotNull Constraints constraint, @NotNull ActionManager actionManager) { + if (action == this) { + throw new IllegalArgumentException("Cannot add a group to itself"); + } // Check that action isn't already registered if (!(action instanceof Separator)) { - if (mySortedChildren.contains(action)){ + if (mySortedChildren.contains(action)) { throw new IllegalArgumentException("cannot add an action twice"); } for (Pair pair : myPairs) { diff --git a/platform-resources/src/idea/LangActions.xml b/platform-resources/src/idea/LangActions.xml index 623035b8ce..c2ad9c7662 100644 --- a/platform-resources/src/idea/LangActions.xml +++ b/platform-resources/src/idea/LangActions.xml @@ -85,6 +85,8 @@ + + @@ -145,7 +147,6 @@ - diff --git a/platform-resources_eng/src/messages/ActionsBundle.properties b/platform-resources_eng/src/messages/ActionsBundle.properties index 1a2b2f5d91..6aff89587c 100644 --- a/platform-resources_eng/src/messages/ActionsBundle.properties +++ b/platform-resources_eng/src/messages/ActionsBundle.properties @@ -352,7 +352,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.GotoAction.text=_Action... +action.GotoAction.text=Find _Action... action.GotoAction.description=Quickly navigate to action by name action.GotoLine.text=_Line... action.GotoLine.description=Navigate to a line in editor by its number @@ -1062,3 +1062,16 @@ group.HierarchyGroup.text=Hierarchy Actions group.DebugMainMenu.text=Debugger Actions group.ToggleBreakpointAction.text=Breakpoint Actions group.CommentGroup.text=Comment Actions +group.CodeFormatGroup.text=Code Formatting Actions +group.GoToTargetEx.text=Goto by Name Actions +group.GoToErrorGroup.text=Goto Error/Bookmark Actions +group.GoToMenuEx.text=Method Navigation Actions +group.GoToCodeGroup.text=Goto by Reference Actions +group.GoToChangeMarkerGroup.text=Change Navigation Actions +group.CoverageMenu.text=Code Coverage Actions +group.ToolsXmlGroup.text=XML Actions +group.EditorPopupMenu2.text=Debug Actions +group.VersionControlsGroup.text=VCS/LVCS Actions +group.EditorPopupMenu.Run.text=Compile/Run Actions +group.ProjectViewCompileGroup.text=Compile/Debug Actions +group.ProjectViewAnalysisGroup.text=Analysis Actions diff --git a/resources/src/idea/ActionManager.xml b/resources/src/idea/ActionManager.xml index 4e2855438d..45ae3c2506 100644 --- a/resources/src/idea/ActionManager.xml +++ b/resources/src/idea/ActionManager.xml @@ -133,6 +133,8 @@ + + @@ -347,11 +349,9 @@ - - - + - + @@ -393,11 +393,9 @@ - - - + - + @@ -674,11 +672,11 @@ - + - + diff --git a/resources/src/idea/XmlActions.xml b/resources/src/idea/XmlActions.xml index b05d013856..80623e2a5c 100644 --- a/resources/src/idea/XmlActions.xml +++ b/resources/src/idea/XmlActions.xml @@ -9,30 +9,13 @@ - - + - - - - - - - - - - - - - - - - - +