diff --git a/topics/reference_guide/editors.md b/topics/reference_guide/editors.md index d64b7348c..86b9e33b5 100644 --- a/topics/reference_guide/editors.md +++ b/topics/reference_guide/editors.md @@ -1,10 +1,11 @@ - + # Editors The Editors section overview. -This section covers working with text in the IntelliJ Platform editor. +This section covers working with text in the IntelliJ Platform editor: + * [](editor_basics.md) * [](text_selection.md) * [](multiple_carets.md) @@ -19,6 +20,12 @@ From an [Action's `DataContext`](action_system.md#determining-the-action-context For a given PSI Element, use [`PsiEditorUtil.findEditor()`](%gh-ic%/platform/editor-ui-api/src/com/intellij/psi/util/PsiEditorUtil.java) +### How can I be notified about editor events? + +Use project-level listener [`FileEditorManagerListener`](%gh-ic%/platform/analysis-api/src/com/intellij/openapi/fileEditor/FileEditorManagerListener.java) +or [`FileEditorManagerListener$Before`](%gh-ic%/platform/analysis-api/src/com/intellij/openapi/fileEditor/FileEditorManagerListener.java) +to be notified about all file open/closed/selection changed events. + ### How do I open an text editor for a "fake" file? Create a [`LightVirtualFile`](%gh-ic%/platform/core-api/src/com/intellij/testFramework/LightVirtualFile.java) with the contents