mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
action-update-thread: PreviewFormAction update moved to bgt due to failing performance test
GitOrigin-RevId: 13a366054c9ca587052d30fbc1e93ecb0270c4c8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ba518c4845
commit
df6f33f32b
@@ -66,6 +66,8 @@ import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.*;
|
||||
|
||||
import static com.intellij.openapi.actionSystem.impl.Utils.getOrCreateUpdateSession;
|
||||
|
||||
public final class PreviewFormAction extends AnAction{
|
||||
private static final Logger LOG = Logger.getInstance(PreviewFormAction.class);
|
||||
|
||||
@@ -104,7 +106,8 @@ public final class PreviewFormAction extends AnAction{
|
||||
|
||||
@Override
|
||||
public void update(@NotNull final AnActionEvent e) {
|
||||
final GuiEditor editor = FormEditingUtil.getActiveEditor(e.getDataContext());
|
||||
GuiEditor editor = getOrCreateUpdateSession(e).compute(this, "getEditor", ActionUpdateThread.EDT,
|
||||
() -> FormEditingUtil.getActiveEditor(e.getDataContext()));
|
||||
|
||||
if(editor == null){
|
||||
e.getPresentation().setVisible(false);
|
||||
@@ -120,7 +123,7 @@ public final class PreviewFormAction extends AnAction{
|
||||
|
||||
@Override
|
||||
public @NotNull ActionUpdateThread getActionUpdateThread() {
|
||||
return ActionUpdateThread.EDT;
|
||||
return ActionUpdateThread.BGT ;
|
||||
}
|
||||
|
||||
private static void showPreviewFrame(@NotNull final Module module, @NotNull final VirtualFile formFile,
|
||||
|
||||
Reference in New Issue
Block a user