diff options
author | Holger Voormann | 2020-11-03 17:03:41 +0000 |
---|---|---|
committer | Holger Voormann | 2020-11-03 17:03:41 +0000 |
commit | 85733e46c730ad6732d81a1b8abe1fda64670d86 (patch) | |
tree | c508a4ddd0e43256c7f9d32efcc3816ec55f86be | |
parent | 056a827084d22f213d92c41eb397f24f4cf74fa1 (diff) | |
download | eclipse.platform.ua-85733e46c730ad6732d81a1b8abe1fda64670d86.tar.gz eclipse.platform.ua-85733e46c730ad6732d81a1b8abe1fda64670d86.tar.xz eclipse.platform.ua-85733e46c730ad6732d81a1b8abe1fda64670d86.zip |
Bug 568505 - [Help][Search] Often same category is shown multiple timesY20201105-1200I20201105-1800
Fix bug introduced by commit 779b48d505fb884c798172493096bd6a6014918f
(see bug 497048):
In the "Help > Help Contents" window, when in the "Search Results" tab
"Group by Categories" is activated, often the same categories are
displayed multiple times instead of once each.
Change-Id: I23568f92937d1905808c2120b1e331b795d139c4
Signed-off-by: Holger Voormann <eclipse@voormann.de>
-rw-r--r-- | org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java index 5af6d9ae8..1eb50b7cc 100644 --- a/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java +++ b/org.eclipse.help.webapp/src/org/eclipse/help/internal/webapp/data/SearchData.java @@ -705,7 +705,9 @@ public class SearchData extends ActivitiesData { catOrder.put(order.get(i), Integer.valueOf(i)); } - Arrays.sort(toSort, (c1, c2) -> { + Arrays.sort(toSort, (hit1, hit2) -> { + IHelpResource c1 = hit1.getCategory(); + IHelpResource c2 = hit2.getCategory(); if (c1 == null && c2 == null) return 0; if (c1 == null) return 1; if (c2 == null) return -1; |