Any guideline for choosing/writing the UI code

Answered

It seems currently there are four ways to write the UI in the IDEA:

1: Swing:

I found it is not easier to use the Swing and time-consuming to write GUI in the swing because of its API design.

2. GUI form:

I found there is not much documentation of the GUI form. I often need to check the IDEA source code to find some examples.

3. Kotlin DSL UI:

For Kotlin DSL UI, there is not much documentation (I only found this https://plugins.jetbrains.com/docs/intellij/kotlin-ui-dsl-version-2.html#panel) and I have no idea how to write a more complex UI when using Kotlin DSL UI.
4. JCEF:

I found the JCEF performance in IDEA is not good for some reason and there are some bugs that I can't use it (will report them in the issue tracker).

Questions:
Our team is working on developing some plugins with some complex UI in the IDEA.

1. Do you have any plans to make more documentation for the Kotlin DSL UI? Or any other helpful resources for using it to write a bit more complex UI?

2. What UI framework do you recommend to write the UI which are easier to write and build complex UI?

3. Any other ways to build the UI which is easier and faster to build the UI?

 

Thanks a lot.

2 comments
Comment actions Permalink

Hi,

  1. We are always happy to get feedback about the current documentation. If you find anything confusing or missing, please use the Feedback widget at the bottom of a page (click the "No" button, and let us know what you would like to see there).
    Regarding the Kotlin UI DSL, please keep in mind that its purpose is to build UI forms only, not general UIs like complex/fancy UI components with advanced behavior. UI forms are intended to gather data from user input and bind it to state objects.
    You can find example implementations in the UI DSL Showcase (https://plugins.jetbrains.com/docs/intellij/kotlin-ui-dsl-version-2.html#ui-dsl-examples).
  2. The current recommendation is to use Swing and the components provided by the IntelliJ Platform whenever possible. See: https://plugins.jetbrains.com/docs/intellij/user-interface-components.html
  3. I suggest basing on what is done in the IDE. You can use the UI Inspector to find the underlying implementation of UI components:
    https://plugins.jetbrains.com/docs/intellij/internal-ui-inspector.html#using-the-ui-inspector
0
Comment actions Permalink

@Karol Lewandowski Thanks for the answer! It is really helpful.

0

Please sign in to leave a comment.