Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PluginException: ActionUpdateThread.OLD_EDT is deprecated #88

Open
medmunds opened this issue Apr 6, 2024 · 4 comments
Open

PluginException: ActionUpdateThread.OLD_EDT is deprecated #88

medmunds opened this issue Apr 6, 2024 · 4 comments

Comments

@medmunds
Copy link

medmunds commented Apr 6, 2024

Apparently the Dash plugin needs an update for newer JetBrains IDEs: "'de.dreamlab.dash.SmartSearchAction' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc."

I've started getting the following exception in IDE Internal Errors, repeatedly:

Exception in plugin Dash (3.3). … Please report the problem to Gerard Delmàs.
stacktrace.txt:

com.intellij.diagnostic.PluginException: `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'de.dreamlab.dash.SmartSearchAction' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: com.paperetto.dash]
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:90)
	at com.intellij.diagnostic.PluginException.reportDeprecatedUsage(PluginException.java:125)
	at com.intellij.openapi.actionSystem.ActionUpdateThreadAware.getActionUpdateThread(ActionUpdateThreadAware.java:21)
	at com.intellij.openapi.actionSystem.AnAction.getActionUpdateThread(AnAction.java:199)

(Might be related to #87.)

  • PyCharm 2024.1
  • Dash plugin 3.3
@s2k
Copy link

s2k commented Apr 17, 2024

Seeing the same in 'RubyMine 2024.1 Build #RM-241.14494.234`

@alperyazgan
Copy link

Same with the PhpStorm

PhpStorm 2024.1
Build #PS-241.14494.237, built on March 27, 2024
Runtime version: 17.0.10+8-b1207.12 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.4.1
...
Non-Bundled Plugins:
  com.paperetto.dash (3.3)
...

@medmunds
Copy link
Author

This error will likely show up in the 2024.1 version of every JetBrains IDE. They share a common plugin API.

It looks like the deprecation was first added in the 2022.3 quarterly releases (so, a little less than two years ago). I don't know whether "going to be removed soon" means 2024.2 or 2025.1, but when that occurs the plugin will probably be completely broken.

I think the fix may be as simple as adding getActionUpdateThread to the plugin's shared AbstractMenuAction class:

Index: src/de/dreamlab/dash/AbstractMenuAction.java
===================================================================
@@ -54,4 +54,9 @@
 
         presentation.setEnabled(PlatformDataKeys.EDITOR.getData(e.getDataContext()) != null);
     }
+
+    @Override
+    public @NotNull ActionUpdateThread getActionUpdateThread() {
+        return ActionUpdateThread.BGT;
+    }
 }

(But it's a very long time since I've done any Java coding, and I'm not set up to build JetBrains plugins to test it.)

@mrclrchtr
Copy link

I tried Dash the first time today and could not open the IntelliJ Plugin because of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants