Skip to content

Commit

Permalink
fix toolbar blinking for new separator instances
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 92c3e88d317d34a1e516c80b2a538740c3f9d56f
  • Loading branch information
gregsh authored and intellij-monorepo-bot committed Dec 14, 2024
1 parent 7f30a28 commit eff644c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions platform/platform-api/api-dump-unreviewed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1703,6 +1703,7 @@ f:com.intellij.openapi.actionSystem.Separator
- <init>(java.util.function.Supplier):V
- s:create():com.intellij.openapi.actionSystem.Separator
- s:create(java.lang.String):com.intellij.openapi.actionSystem.Separator
- equals(java.lang.Object):Z
- getActionUpdateThread():com.intellij.openapi.actionSystem.ActionUpdateThread
- s:getInstance():com.intellij.openapi.actionSystem.Separator
- getText():java.lang.String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Objects;
import java.util.function.Supplier;

/**
Expand Down Expand Up @@ -52,6 +53,15 @@ public Separator(@NotNull Supplier<@NlsContexts.Separator String> dynamicText) {
return myDynamicText.get();
}

@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null || getClass() != obj.getClass()) return false;

Separator other = (Separator) obj;
return Objects.equals(myDynamicText, other.myDynamicText);
}

@Override
public String toString() {
return IdeBundle.message("action.separator", myDynamicText.get());
Expand Down

0 comments on commit eff644c

Please sign in to comment.