Skip to content

Commit

Permalink
Merge pull request #222 from ZenUml/fix/warning-old_edt
Browse files Browse the repository at this point in the history
perf: ensure actions are updated on EDT thread
  • Loading branch information
MrCoder authored Dec 23, 2024
2 parents c6a43fe + 6228d0c commit d032db3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.intellij.plugins.markdown.ui.actions.editorLayout;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.Toggleable;
Expand All @@ -17,6 +18,12 @@ protected BaseChangeSplitLayoutAction(@Nullable SplitFileEditor.SplitEditorLayou
myLayoutToSet = layoutToSet;
}

@Override
@NotNull
public ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.EDT;
}

@Override
public void update(@NotNull AnActionEvent e) {
final SplitFileEditor splitFileEditor = MarkdownActionUtil.findSplitEditor(e);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
package org.intellij.plugins.markdown.ui.actions.editorLayout;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import org.intellij.plugins.markdown.ui.split.SplitFileEditor;
import org.jetbrains.annotations.NotNull;

public class ZenUmlEditorOnlyLayoutChangeAction extends BaseChangeSplitLayoutAction {
protected ZenUmlEditorOnlyLayoutChangeAction() {
super(SplitFileEditor.SplitEditorLayout.FIRST);
}

@Override
@NotNull
public ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.EDT;
}
}
8 changes: 8 additions & 0 deletions src/org/intellij/sequencer/ShowSequenceAction.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.intellij.sequencer;

import com.intellij.openapi.actionSystem.ActionUpdateThread;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
Expand All @@ -11,6 +12,7 @@
import org.intellij.sequencer.generator.filters.NoGetterSetterFilter;
import org.intellij.sequencer.generator.filters.NoPrivateMethodsFilter;
import org.intellij.sequencer.generator.filters.ProjectOnlyFilter;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;
import java.awt.*;
Expand All @@ -23,6 +25,12 @@ public class ShowSequenceAction extends AnAction {
private boolean _noConstructors;
private boolean _smartInterface = true;

@Override
@NotNull
public ActionUpdateThread getActionUpdateThread() {
return ActionUpdateThread.EDT;
}

public ShowSequenceAction() {
}

Expand Down

0 comments on commit d032db3

Please sign in to comment.