fix: intellij platform warning (#400)

This commit is contained in:
Carl-Robert Linnupuu 2024-03-12 23:10:34 +02:00
parent 8c986fd7de
commit 678768c069
14 changed files with 81 additions and 13 deletions

View file

@ -14,6 +14,7 @@ import static java.util.stream.Collectors.toList;
import com.intellij.notification.Notification;
import com.intellij.notification.NotificationType;
import com.intellij.notification.Notifications;
import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.application.ApplicationManager;
@ -117,6 +118,11 @@ public class GenerateGitCommitMessageAction extends AnAction {
}
}
@Override
public @NotNull ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.EDT;
}
private CompletionEventListener<String> getEventListener(Project project, Document document) {
return new CompletionEventListener<>() {
private final StringBuilder messageBuilder = new StringBuilder();