Skip to content

Commit 471997a

Browse files
committed
Use correct ActionUpdateThread for ToggleAnAction
Fixes #95
1 parent 5a17bf5 commit 471997a

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 1.2.1
2+
* Fixed ``ToggleAnAction must override getActionUpdateThread`` warning inside IntelliJ 2024+
3+
14
## 1.2.0
25
* Run GlobalProcessors (e.g. Reformat) last so that code is formatted correctly #90
36
* Dropped support for IntelliJ versions < 2023

src/main/java/software/xdev/saveactions/core/action/ToggleAnAction.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
import static software.xdev.saveactions.model.Action.activate;
44

5+
import org.jetbrains.annotations.NotNull;
6+
7+
import com.intellij.openapi.actionSystem.ActionUpdateThread;
58
import com.intellij.openapi.actionSystem.AnActionEvent;
69
import com.intellij.openapi.actionSystem.ToggleAction;
710
import com.intellij.openapi.project.DumbAware;
@@ -37,4 +40,10 @@ public void setSelected(final AnActionEvent event, final boolean state)
3740
storage.setEnabled(activate, state);
3841
}
3942
}
43+
44+
@Override
45+
public @NotNull ActionUpdateThread getActionUpdateThread()
46+
{
47+
return ActionUpdateThread.BGT;
48+
}
4049
}

0 commit comments

Comments
 (0)