Deprecation of JavaFX runtime in the IntelliJ Platform

Answered

Currently our plugin utilize JavaFX API's to render webviews, Also our current support matrix would be 2017.1.X to 2020.1.X

Moving forward with the latest Intellij versions, The deprecation of JavaFX runtime will leave us with few questions.

01. When adding JavaFX api as an optional dependency to our plugin. Does this optional plugin contain the same native code which is shipped with the IDE before?

02. Can we ensure that there will be a consistent behavior across all the JBR versions ?

03. Is there any safer way / technique of migrating from JavaFX to JCEF, Rather than maintaining two major version of the plugin. (Example: One with JavaFX and other with JCEF implementation) Any recommendations ?

Appreciate if it's possible to provide some more documentation / examples related to JCEF.

5 comments
Comment actions Permalink

(1) You cannot add optional dependency on JavaFX runtime plugin as it must be present for your plugin to continue having JavaFX related features in 2020.2 and later.

(2) Technically yes, all existing JavaFX functionality should continue working as previously.

(3) JCEF can be used only in 2020.2 "safely", so usually it is not required to offer both JCEF _and_ JavaFX for 2020.2 and later releases simultaneously. But it should be possible to have both JCEF and JavaFX at the same time, e.g. Markdown plugin offers choice for Preview feature.

There's currently https://www.jetbrains.org/intellij/sdk/docs/reference_guide/jcef.html, please ask specific questions/topics you want to learn in addition.

1
Comment actions Permalink

Thanks for the feedback. I have few specific questions that need to be clarified.

Q1. How can i access the JCEF api com.intellij.ui.jcef Is there any link to download the latest platform SDK which has the above api ?

Q2. ToolWindowFactory.isDoNotActivateOnStart() is marked as a deprecated method by the IntelliJ checker and the suggested option is to configure in the plugin .xml  as follows. But in the previous SDK's this flag doesn't exist. How can we achieve backward compatibility in these type of scenarios.

<toolWindow ....doNotActivateOnStart="false"/>

 

0
Comment actions Permalink

JCEF was introduced with 2020.1 - it was mentioned in our docs and this blog post.
SDK can be directly downloaded from IntelliJ Platform Artifacts Repositories.
However, we highly recommend using Gradle for plugin development.

Regarding the backward compatibility, it's recommended to create a separated branch providing a build targeting the newer SDK.

0
Comment actions Permalink

I also have a related question. Can we add JCEF library (com.intellij.ui.jcef) as an external library to a plugin development project? Because we need to support JCEF for older versions also. Since JCEF introduced in IntelliJ 2020.1 version, it would be better if we can use it as an external library. 

0
Comment actions Permalink

No, JCEF is released as a part of the platform - not a separated module that you can import.

0

Please sign in to leave a comment.