IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 672 | 672 | popupMenu.add(rememberLastTags); |
| 673 | 673 | } |
| 674 | 674 | |
| 675 | | private String code(String text) { |
| 676 | | return "<code>" + text + "</code> "; |
| 677 | | } |
| 678 | | |
| 679 | 675 | @Override |
| 680 | 676 | public void setContentPane(Container contentPane) { |
| 681 | 677 | final int commandDownMask = GuiHelper.getMenuShortcutKeyMaskEx(); |
| 682 | 678 | List<String> lines = new ArrayList<>(); |
| 683 | 679 | Shortcut sc = Shortcut.findShortcut(KeyEvent.VK_1, commandDownMask); |
| 684 | 680 | if (sc != null) { |
| 685 | | lines.add(code(sc.getKeyText()) + tr("to apply first suggestion")); |
| | 681 | lines.add(sc.getKeyText() + " " + tr("to apply first suggestion")); |
| 686 | 682 | } |
| 687 | | lines.add(code(KeyEvent.getKeyModifiersText(KeyEvent.SHIFT_MASK)+'+'+KeyEvent.getKeyText(KeyEvent.VK_ENTER)) |
| | 683 | lines.add(KeyEvent.getKeyModifiersText(KeyEvent.SHIFT_MASK)+'+'+KeyEvent.getKeyText(KeyEvent.VK_ENTER) + " " |
| 688 | 684 | +tr("to add without closing the dialog")); |
| 689 | 685 | sc = Shortcut.findShortcut(KeyEvent.VK_1, commandDownMask | KeyEvent.SHIFT_DOWN_MASK); |
| 690 | 686 | if (sc != null) { |
| 691 | | lines.add(code(sc.getKeyText()) + tr("to add first suggestion without closing the dialog")); |
| | 687 | lines.add(sc.getKeyText() + " " + tr("to add first suggestion without closing the dialog")); |
| 692 | 688 | } |
| 693 | 689 | final JLabel helpLabel = new JLabel("<html>" + Utils.join("<br>", lines) + "</html>"); |
| 694 | 690 | helpLabel.setFont(helpLabel.getFont().deriveFont(Font.PLAIN)); |
| 695 | | contentPane.add(helpLabel, GBC.eol().fill(GridBagConstraints.HORIZONTAL).insets(1, 2, 1, 2)); |
| | 691 | contentPane.add(helpLabel, GBC.eol().fill(GridBagConstraints.HORIZONTAL).insets(10, 10, 10, 10)); |
| 696 | 692 | super.setContentPane(contentPane); |
| 697 | 693 | } |
| 698 | 694 | |