From 3563db98f2d2a0b03d05df0f3388114924d491ed Mon Sep 17 00:00:00 2001 From: MohamedAhmed Date: Fri, 7 Feb 2025 23:46:12 +0200 Subject: [PATCH 1/6] Fix tooltip to display all linked files instead of just the first one --- .../org/jabref/gui/maintable/columns/FileColumn.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/jabref/gui/maintable/columns/FileColumn.java b/src/main/java/org/jabref/gui/maintable/columns/FileColumn.java index 974b5fd111e..fc29018fe54 100644 --- a/src/main/java/org/jabref/gui/maintable/columns/FileColumn.java +++ b/src/main/java/org/jabref/gui/maintable/columns/FileColumn.java @@ -139,11 +139,20 @@ private void setCommonSettings() { private String createFileTooltip(List linkedFiles) { if (!linkedFiles.isEmpty()) { - return Localization.lang("Open file %0", linkedFiles.getFirst().getLink()); + StringBuilder tooltipText = new StringBuilder(); + + // Iterate through all linked files and append their links to the tooltip text + for (LinkedFile linkedFile : linkedFiles) { + tooltipText.append(linkedFile.getLink()).append("\n"); // Add a new line between each link + } + + // Return the concatenated text as a formatted tooltip + return Localization.lang("Open files: \n%0", tooltipText.toString()); } return null; } + private ContextMenu createFileMenu(BibEntryTableViewModel entry, List linkedFiles) { if (linkedFiles.size() <= 1) { return null; From e315d77a2b5fe3271ed8176591878570d720d970 Mon Sep 17 00:00:00 2001 From: Mohamed Ahmed Date: Sat, 8 Feb 2025 00:39:08 +0200 Subject: [PATCH 2/6] Log #12470 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bccf8db02be..46e296d6d62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We added a feature for copying entries to libraries, available via the context menu, with an option to include cross-references. [#12374](https://github.com/JabRef/jabref/pull/12374) ### Changed - +- Change Tooltip to display all linked Files when Hovering instead of only displays the First Linked File. [#12470](https://github.com/JabRef/jabref/issues/12470) - We improved the offline parsing of BibTeX data from PDF-documents. [#12278](https://github.com/JabRef/jabref/issues/12278) - The tab bar is now hidden when only one library is open. [#9971](https://github.com/JabRef/jabref/issues/9971) From 1c5d8b50d5c3c6da55426069059a4f4ba5767027 Mon Sep 17 00:00:00 2001 From: Mohamed Ahmed Date: Sat, 8 Feb 2025 00:42:34 +0200 Subject: [PATCH 3/6] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46e296d6d62..b47f098ca9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv - We added a feature for copying entries to libraries, available via the context menu, with an option to include cross-references. [#12374](https://github.com/JabRef/jabref/pull/12374) ### Changed + - Change Tooltip to display all linked Files when Hovering instead of only displays the First Linked File. [#12470](https://github.com/JabRef/jabref/issues/12470) - We improved the offline parsing of BibTeX data from PDF-documents. [#12278](https://github.com/JabRef/jabref/issues/12278) - The tab bar is now hidden when only one library is open. [#9971](https://github.com/JabRef/jabref/issues/9971) From d6a50e1b7ffa415dec28616bb4654f8db4d5e804 Mon Sep 17 00:00:00 2001 From: MohamedAhmed Date: Sat, 8 Feb 2025 21:43:42 +0200 Subject: [PATCH 4/6] Remove unnecessary comments --- .../java/org/jabref/gui/maintable/columns/FileColumn.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/jabref/gui/maintable/columns/FileColumn.java b/src/main/java/org/jabref/gui/maintable/columns/FileColumn.java index fc29018fe54..b073f27d7cf 100644 --- a/src/main/java/org/jabref/gui/maintable/columns/FileColumn.java +++ b/src/main/java/org/jabref/gui/maintable/columns/FileColumn.java @@ -141,12 +141,10 @@ private String createFileTooltip(List linkedFiles) { if (!linkedFiles.isEmpty()) { StringBuilder tooltipText = new StringBuilder(); - // Iterate through all linked files and append their links to the tooltip text for (LinkedFile linkedFile : linkedFiles) { - tooltipText.append(linkedFile.getLink()).append("\n"); // Add a new line between each link + tooltipText.append(linkedFile.getLink()).append("\n"); } - // Return the concatenated text as a formatted tooltip return Localization.lang("Open files: \n%0", tooltipText.toString()); } return null; From 3ddb4d7e8d4ede91edbb528b4e181c2b6e6d47ed Mon Sep 17 00:00:00 2001 From: MohamedAhmed Date: Mon, 10 Feb 2025 00:15:25 +0200 Subject: [PATCH 5/6] modify Open file key in JabRef_en.propertie --- src/main/resources/l10n/JabRef_en.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/l10n/JabRef_en.properties b/src/main/resources/l10n/JabRef_en.properties index 1e90419d3d8..d6a7c3b7fde 100644 --- a/src/main/resources/l10n/JabRef_en.properties +++ b/src/main/resources/l10n/JabRef_en.properties @@ -1958,7 +1958,7 @@ Move\ panel\ down=Move panel down Linked\ files=Linked files Group\ view\ mode\ set\ to\ intersection=Group view mode set to intersection Group\ view\ mode\ set\ to\ union=Group view mode set to union -Open\ file\ %0=Open file %0 +Open\ files\:\ \n%0=Open files: \n%0 Toggle\ intersection=Toggle intersection Toggle\ union=Toggle union The\ group\ name\ contains\ the\ keyword\ separator\ "%0"\ and\ thus\ probably\ does\ not\ work\ as\ expected.=The group name contains the keyword separator "%0" and thus probably does not work as expected. From c5e5a6b8f3896daf3df61f2c34edf5ffa49b7783 Mon Sep 17 00:00:00 2001 From: MohamedAhmed Date: Mon, 10 Feb 2025 00:29:46 +0200 Subject: [PATCH 6/6] Fix Checkstyle: Remove extra empty line between methods --- src/main/java/org/jabref/gui/maintable/columns/FileColumn.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/jabref/gui/maintable/columns/FileColumn.java b/src/main/java/org/jabref/gui/maintable/columns/FileColumn.java index b073f27d7cf..a6226379cb9 100644 --- a/src/main/java/org/jabref/gui/maintable/columns/FileColumn.java +++ b/src/main/java/org/jabref/gui/maintable/columns/FileColumn.java @@ -142,7 +142,7 @@ private String createFileTooltip(List linkedFiles) { StringBuilder tooltipText = new StringBuilder(); for (LinkedFile linkedFile : linkedFiles) { - tooltipText.append(linkedFile.getLink()).append("\n"); + tooltipText.append(linkedFile.getLink()).append("\n"); } return Localization.lang("Open files: \n%0", tooltipText.toString()); @@ -150,7 +150,6 @@ private String createFileTooltip(List linkedFiles) { return null; } - private ContextMenu createFileMenu(BibEntryTableViewModel entry, List linkedFiles) { if (linkedFiles.size() <= 1) { return null;