Register shortcuts of Remove/Edit Maven run configuration on Maven Tool Window, non...
authorSergey Evdokimov <sergey.evdokimov@jetbrains.com>
Wed, 2 Oct 2013 12:46:10 +0000 (16:46 +0400)
committerSergey Evdokimov <sergey.evdokimov@jetbrains.com>
Wed, 2 Oct 2013 12:46:10 +0000 (16:46 +0400)
plugins/maven/src/main/java/org/jetbrains/idea/maven/navigator/MavenProjectsNavigator.java
plugins/maven/src/main/resources/META-INF/plugin.xml

index 9bde796d11e964d9b613b88560ac1eb7ae733862..8d8c6f9efe5d72b0c58858bc306d1da8a0caeea5 100644 (file)
@@ -22,6 +22,8 @@ import com.intellij.execution.RunnerAndConfigurationSettings;
 import com.intellij.ide.util.treeView.TreeState;
 import com.intellij.openapi.Disposable;
 import com.intellij.openapi.actionSystem.ActionManager;
+import com.intellij.openapi.actionSystem.AnAction;
+import com.intellij.openapi.actionSystem.CommonShortcuts;
 import com.intellij.openapi.actionSystem.DefaultActionGroup;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.PersistentStateComponent;
@@ -270,6 +272,11 @@ public class MavenProjectsNavigator extends MavenSimpleProjectComponent implemen
     initTree();
     JPanel panel = new MavenProjectsNavigatorPanel(myProject, myTree);
 
+    AnAction removeAction = ActionManager.getInstance().getAction("Maven.RemoveRunConfiguration");
+    removeAction.registerCustomShortcutSet(CommonShortcuts.DELETE, myTree, myProject);
+    AnAction editSource = ActionManager.getInstance().getAction("Maven.EditRunConfiguration");
+    editSource.registerCustomShortcutSet(CommonShortcuts.getEditSource(), myTree, myProject);
+
     final ToolWindowManagerEx manager = ToolWindowManagerEx.getInstanceEx(myProject);
     myToolWindow = (ToolWindowEx)manager.registerToolWindow(TOOL_WINDOW_ID, panel, ToolWindowAnchor.RIGHT, myProject, true);
     myToolWindow.setIcon(MavenIcons.ToolWindowMaven);
index 8a578d8290b2f2739f4a3b8c4bd55197361ea8de..bf2da5ad500d1ededb081f259cc3cb2405e22b72 100644 (file)
     <group id="Maven.RunConfigurationMenu" popup="true" class="org.jetbrains.idea.maven.navigator.actions.MavenRunConfigurationMenu">
       <separator/>
       <action id="Maven.EditRunConfiguration"
-              text="Edit Run Configuration..." icon="AllIcons.Actions.Edit" use-shortcut-of="EditSource"
+              text="Edit Run Configuration..." icon="AllIcons.Actions.Edit"
               class="org.jetbrains.idea.maven.navigator.actions.EditMavenRunConfigurationAction" />
       <action id="Maven.RemoveRunConfiguration"
-              text="Remove Run Configuration" icon="AllIcons.General.Remove" use-shortcut-of="$Delete"
+              text="Remove Run Configuration" icon="AllIcons.General.Remove"
               class="org.jetbrains.idea.maven.navigator.actions.RemoveMavenRunConfigurationAction" />
     </group>