Darkyenus / glsl4idea

A GLSL language plugin for IntelliJ IDEA
GNU Lesser General Public License v3.0
100 stars 30 forks source link

Exception in IJ 241: need to specify ActionUpdateThread for actions #189

Open rock3r opened 7 months ago

rock3r commented 7 months ago

Running on IJ 241, you get this error:

#glslplugin.actions.GLSLDeduceExpressionTypeAction - `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'glslplugin.actions.GLSLDeduceExpressionTypeAction' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: GLSL]
com.intellij.diagnostic.PluginException: `ActionUpdateThread.OLD_EDT` is deprecated and going to be removed soon. 'glslplugin.actions.GLSLDeduceExpressionTypeAction' must override `getActionUpdateThread` and chose EDT or BGT. See ActionUpdateThread javadoc. [Plugin: GLSL]
    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)

The fix is pretty simple: override getActionUpdateThread in all actions and specify whether they require EDT to update, or can be updated in the background.

Note that there might be other actions with the same issue; make sure the override is set in all actions.