kstenschke / shifter-plugin

Intelligent string/code manipulation plugin for Jetbrains IDEs: Detects shiftable type of word/line/selection and manipulates it on keyboard shortcut
http://plugins.jetbrains.com/plugin/6149
Apache License 2.0
107 stars 13 forks source link

Error "ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon" since Intellij 2024.1 #53

Open tomsquest opened 7 months ago

tomsquest commented 7 months ago

Using latest Intellij (2024.1)

IntelliJ IDEA 2024.1 (Ultimate Edition)
Build #IU-241.14494.240, built on March 28, 2024
Non-Bundled Plugins:
  Shifter (1.9.6)

An notification error popups:

com.intellij.diagnostic.PluginException: `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'com.kstenschke.shifter.actions.ShiftUpMoreAction' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: Shifter]
    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)
Noorts commented 5 months ago

FYI: For anybody looking to pick this up, overriding the method to resolve the deprecation is pretty straightforward.

A hindrance could potentially be upgrading plugin dependencies that are being used (although this plugin uses a different dependency than mine; see plugin.xml).

For an example PR see: https://github.com/Noorts/Toggler/pull/66