Skip to content

Commit

Permalink
Avoid duplicate quick access entry
Browse files Browse the repository at this point in the history
  • Loading branch information
serhii.davydiuk authored and serhii.davydiuk committed Jul 29, 2024
1 parent f2de834 commit fd1dd27
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,14 @@ public IStatus runInUIThread(IProgressMonitor monitor) {
QuickAccessEntry.MATCH_PERFECT)));
}
res.addAll(entriesPerProvider.values());

// if one category provides the same single entry like "previous", we can avoid
// showing the duplicate second list
if (res.size() >= 2 && res.get(0).size() == 1 && res.get(1).size() == 1
&& (res.get(0).get(0).element.equals(res.get(1).get(0).element))) {
res.remove(1);
}

return (List<QuickAccessEntry>[]) res.toArray(new List<?>[res.size()]);
}

Expand Down
2 changes: 1 addition & 1 deletion bundles/org.eclipse.ui.workbench/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.ui.workbench; singleton:=true
Bundle-Version: 3.131.0.lgc20240523-1900
Bundle-Version: 3.131.0.lgc202405729-1900
Bundle-Activator: org.eclipse.ui.internal.WorkbenchPlugin
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
Expand Down

0 comments on commit fd1dd27

Please sign in to comment.