String () { String message = IdeBundle.message("open.url.in.browser.tooltip"); Shortcut[] shortcuts = requireNonNull(KeymapManager.getInstance()).getActiveKeymap().getShortcuts(IdeActions.ACTION_GOTO_DECLARATION); String shortcutText = ""; Shortcut mouseShortcut = ContainerUtil.find(shortcuts, shortcut -> !shortcut.isKeyboard()); if (mouseShortcut != null) { shortcutText += KeymapUtil.getShortcutText(mouseShortcut); shortcutText = shortcutText.replace("Button1 ", ""); } Shortcut keyboardShortcut = ContainerUtil.find(shortcuts, shortcut -> shortcut.isKeyboard()); if (keyboardShortcut != null) { if (!shortcutText.isEmpty()) shortcutText += ", "; shortcutText += KeymapUtil.getShortcutText(keyboardShortcut); } if (!shortcutText.isEmpty()) { message += " (" + shortcutText + ")"; } return message; }