[ui] fix equals implementation for HelpTooltip

Since tooltip title was changed from String to Supplier, equals should be updated to correctly determine if the tooltip title was changed. It is important to avoid firing listeners, when CUSTOM_HELP_TOOLTIP for the action presentation is set, but the title stayed the same, since this can cause the tooltip to blink.

IDEA-336264

follow-up: f32d2129f58928a5eb2acbd81d5a14e3f3c186cd

GitOrigin-RevId: 1dcc8c040203c05cb4b0b3169bb792771de06a5a
This commit is contained in:
Julia Beliaeva
2023-10-25 04:14:23 +02:00
committed by intellij-monorepo-bot
parent e3023fe037
commit e289bf0253

View File

@@ -318,7 +318,8 @@ public class HelpTooltip {
if (that == null || getClass() != that.getClass()) return false;
HelpTooltip tooltip = (HelpTooltip)that;
return neverHide == tooltip.neverHide &&
Objects.equals(title, tooltip.title) &&
(title == null ? tooltip.title == null
: tooltip.title != null && Objects.equals(title.get(), tooltip.title.get())) &&
Objects.equals(shortcut, tooltip.shortcut) &&
Objects.equals(description, tooltip.description) &&
Objects.equals(link, tooltip.link) &&