2025-05-14 15:47:06 +02:00

3.0 KiB

Editors

The Editors section overview/FAQ.

Product Help: Editor basics

This section covers working with text in the IntelliJ Platform editor:

  • Tutorial:

Editors FAQ

How do I get the active editor instance?

Context API
Generic FileEditorManager
Action CommonDataKeys.EDITOR
PsiEditorUtil.findEditor()

How can I be notified about editor events?

Use project-level listener FileEditorManagerListener or FileEditorManagerListener$Before to be notified about all file open/closed/selection changed events.

How can I set a custom editor tab name and tooltip?

EditorTabTitleProvider registered in allows for specifying custom names and tooltips displayed in the title of editor tabs. If access to indexes is not required, it can be marked dumb aware.

How can I set a custom editor tab background color?

EditorTabColorProvider registered in allows for the modification of the background color for specific files. If access to indexes is not required, it can be marked dumb aware.

How do I open a text editor for a "fake" file?

Create a LightVirtualFile with the contents and open it via FileEditorManager.openFile().