IDEA-80385 Quickdoc doesn't support 'Back'/'Forward' keyboard buttons
authorKonstantin Bulenkov <kb@jetbrains.com>
Thu, 26 Jan 2012 18:41:03 +0000 (19:41 +0100)
committerKonstantin Bulenkov <kb@jetbrains.com>
Thu, 26 Jan 2012 18:42:40 +0000 (19:42 +0100)
platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java

index f4f219c30e12de491e0aa9541d179c96feb77402..dbe5d13a980b8734e22b8776fcaaa9a333867f38 100644 (file)
@@ -268,10 +268,14 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr
     myScrollPane.setViewportBorder(JBScrollPane.createIndentBorder());
 
     final DefaultActionGroup actions = new DefaultActionGroup();
-    actions.add(new BackAction());
-    actions.add(new ForwardAction());
+    final BackAction back = new BackAction();
+    final ForwardAction forward = new ForwardAction();
+    actions.add(back);
+    actions.add(forward);
     actions.add(myExternalDocAction = new ExternalDocAction());
-
+    back.registerCustomShortcutSet(CustomShortcutSet.fromString("LEFT"), this);
+    forward.registerCustomShortcutSet(CustomShortcutSet.fromString("RIGHT"), this);
+    myExternalDocAction.registerCustomShortcutSet(CustomShortcutSet.fromString("UP"), this);
     if (additionalActions != null) {
       for (final AnAction action : additionalActions) {
         actions.add(action);