2020-02-19 22:25:03 -08:00

1.9 KiB

title
Editor Components

EditorTextField

Compared to Swing JTextArea, the IntelliJ Platform's editor component has a ton of advantages: syntax highlighting support, code completion, code folding and much more. IntelliJ Platform editors are normally displayed in editor tabs, but they can be embedded in dialogs or tool windows, too. This is enabled by the EditorTextField component.

When creating an EditorTextField, you can specify the following attributes:

  • The file type according to which the text in the text field is parsed;

  • Whether the text field is read-only or editable;

  • Whether the text field is single-line or multiline.

A common use case for EditorTextField is entering the name of a Java class or package. This can be accomplished with the following steps: