From 8d04a93672020b617da39342b53395ac1c7147a8 Mon Sep 17 00:00:00 2001 From: Grzegorz Grzybek Date: Fri, 4 Oct 2024 08:23:36 +0200 Subject: [PATCH] [Fixes #5] Override getActionUpdateThread() to return non-deprecated ActionUpdateThread value --- src/DuplicateLines.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/DuplicateLines.java b/src/DuplicateLines.java index fe1a2c5..a684b37 100644 --- a/src/DuplicateLines.java +++ b/src/DuplicateLines.java @@ -1,4 +1,5 @@ import com.intellij.codeInsight.hint.HintManager; +import com.intellij.openapi.actionSystem.ActionUpdateThread; import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.actionSystem.CommonDataKeys; @@ -59,6 +60,11 @@ public void update(AnActionEvent event) { event.getPresentation().setEnabledAndVisible(event.getData(CommonDataKeys.EDITOR) != null); } + @Override + public ActionUpdateThread getActionUpdateThread() { + return ActionUpdateThread.EDT; + } + /** * Prepares the caret selection and duplicates the line (up or down depeding of the mode parameter) */