exbin / bined-intellij-plugin

Hex viewer/editor plugin for JetBrains IntelliJ platform
https://bined.exbin.org/intellij-plugin
Apache License 2.0
60 stars 9 forks source link

Deprecation of ActionUpdateThread.OLD_EDT in 2024.1 #55

Closed jessicarod7 closed 6 months ago

jessicarod7 commented 8 months ago

Starting in the 2024.1 EAP, user-facing errors are raised for BinEd 0.2.9, shortly after the IDE opens a project:

com.intellij.diagnostic.PluginException: `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'org.exbin.bined.intellij.ContextOpenAsBinaryAction' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: org.exbin.deltahex.intellij]
    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:198)

Confirmed in CLion Nova (241.11109) and classic CLion (241.11761.23)

hajdam commented 8 months ago

Hi, short answer - this is most likely EAP quirk.

Confirmed in Idea 2024.1 EAP (241.11761.10) as well. This check seems to be for performance optimization and same check was present before, but was not active in final release - this could be the case here as well. Error is also not reported in plugin validation report.

Required method getActionUpdateThread is present only since version 2022.2 and would require raising minimum platform version of the plugin. So if this check would be included in final release it would report same error for all plugins older than about a year and half, so I assume it will be switched off for final release and ignore it for now.

jessicarod7 commented 6 months ago

Hey, following up that this error is present in the final 2024.1 release. System details:

IntelliJ IDEA 2024.1 (Ultimate Edition) Build #IU-241.14494.240, built on March 28, 2024 Runtime version: 17.0.10+8-b1207.12 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 6.7.11-200.fc39.x86_64 GC: G1 Young Generation, G1 Old Generation Kotlin: 241.14494.240-IJ Current Desktop: GNOME

Plugin: org.exbin.deltahex.intellij (0.2.9)

hajdam commented 6 months ago

Hi, well, current development build should have this updated if you want to try... https://bined.exbin.org/download/?f=bined-intellij-plugin.zip

I still plan to do some testing and additional fixes, so I'll release it in next few days...

jessicarod7 commented 6 months ago

Tested and the message disappears, thanks @hajdam!

hajdam commented 6 months ago

Released version 0.2.10