OpenLiberty / liberty-tools-intellij

IntelliJ IDEA extension for Liberty
https://plugins.jetbrains.com/plugin/14856-open-liberty-tools
Eclipse Public License 2.0
12 stars 24 forks source link

IntelliJ IDEA 2024.1 support: Resolve warning about deprecation of ActionUpdateThread.OLD_EDT. #720

Closed mrglavas closed 5 months ago

mrglavas commented 5 months ago

After upgrading to IntelliJ IDEA 2024.1, the following error is reported with guidance on how to resolve it:

com.intellij.diagnostic.PluginException: `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'io.openliberty.tools.intellij.actions.RunLibertyDevTask' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: open-liberty.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:199)
    ...

This will require a change to the Liberty dev mode actions.

mrglavas commented 5 months ago

JetBrains is requiring that implementers of actions override the getActionUpdateThread() method to specify whether the action will be executing on a background thread or the event dispatching thread. See documentation here for guidance on how to resolve this warning: https://plugins.jetbrains.com/docs/intellij/basic-action-system.html#principal-implementation-overrides.

mrglavas commented 5 months ago

Resolved by https://github.com/OpenLiberty/liberty-tools-intellij/pull/734.