From c4a99cfa3d303bac58799af3e24237ff3d47b724 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Fri, 20 May 2016 00:24:12 +0200 Subject: [PATCH] Fix #1342: Show description of case converters as tooltip --- CHANGELOG.md | 1 + .../sf/jabref/gui/fieldeditors/contextmenu/CaseChangeMenu.java | 1 + .../sf/jabref/gui/fieldeditors/contextmenu/ConversionMenu.java | 1 + 3 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 964ceb302cc..d2a31cb738f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ We refer to [GitHub issues](https://github.com/JabRef/jabref/issues) by using `# - Integrity check table can be sorted by clicking on column headings - Added \SOFTWARE\Jabref 'Path' registry entry for installation path inside the installer - Added an additional icon to distinguish DOI and URL links ([feature request #696](https://github.com/JabRef/jabref/issues/696)) +- Implemented [#1342](https://github.com/JabRef/jabref/issues/1342): show description of case converters as tooltip ### Fixed - Fixed [#473](https://github.com/JabRef/jabref/issues/473): Values in an entry containing symbols like ' are now properly escaped for exporting to the database diff --git a/src/main/java/net/sf/jabref/gui/fieldeditors/contextmenu/CaseChangeMenu.java b/src/main/java/net/sf/jabref/gui/fieldeditors/contextmenu/CaseChangeMenu.java index dda4a844d6c..1652d9ff555 100644 --- a/src/main/java/net/sf/jabref/gui/fieldeditors/contextmenu/CaseChangeMenu.java +++ b/src/main/java/net/sf/jabref/gui/fieldeditors/contextmenu/CaseChangeMenu.java @@ -34,6 +34,7 @@ public CaseChangeMenu(final JTextComponent parent) { // create menu items, one for each case changer for (final Formatter caseChanger : Formatters.CASE_CHANGERS) { JMenuItem menuItem = new JMenuItem(caseChanger.getName()); + menuItem.setToolTipText(caseChanger.getDescription()); menuItem.addActionListener(e -> parent.setText(caseChanger.format(parent.getText()))); this.add(menuItem); } diff --git a/src/main/java/net/sf/jabref/gui/fieldeditors/contextmenu/ConversionMenu.java b/src/main/java/net/sf/jabref/gui/fieldeditors/contextmenu/ConversionMenu.java index 29e907352fc..61463a75563 100644 --- a/src/main/java/net/sf/jabref/gui/fieldeditors/contextmenu/ConversionMenu.java +++ b/src/main/java/net/sf/jabref/gui/fieldeditors/contextmenu/ConversionMenu.java @@ -37,6 +37,7 @@ public ConversionMenu(JTextComponent opener) { // create menu items, one for each case changer for (Formatter converter : Formatters.CONVERTERS) { JMenuItem menuItem = new JMenuItem(converter.getName()); + menuItem.setToolTipText(converter.getDescription()); menuItem.addActionListener(e -> opener.setText(converter.format(opener.getText()))); this.add(menuItem); }