Description
For plugins that "might" be available depending on the state of the system (e.g., available only if a particular optional dependency is available), it would be nice if they could disable themselves in the event of any issues at initialization time.
For example, as of this writing, the JavaScriptScriptLanguage
tries to wrap a javascript JSR-223 ScriptEngineFactory
. It is possible that the active JVM might not have a javascript implementation, in which case the JavaScriptScriptLanguage
bombs out in its constructor, and an exception stack trace appears on the console about how JavaScriptScriptLanguage
is an invalid plugin. Better would be if the JSSL could proactively check for the needed javascript ScriptEngineFactory
and then disable itself (via getInfo().setEnable(false)
) if the needed thing isn't available.
To make this work as desired, methods of the DefaultPluginService
could filter out any disabled PluginInfo
objects.