mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
editors.md: active editor
This commit is contained in:
parent
8ca1efc6fe
commit
13643996dc
@ -41,7 +41,6 @@ for programmatic registration.
|
||||
* [Can I open an editor which has no underlying file on disk?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206135449-Create-an-Editor-for-a-non-physical-file)
|
||||
* [How do I highlight elements in a source code editor?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206143909-MarkupModel-navigate-highlighted-elements)
|
||||
* [How do I allow to navigate between highlighted elements using Find Next?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206143879-HighlightManager-how-to-enable-F3-functionality)
|
||||
* [How do I get the active editor instance?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206141119-how-to-get-the-Editor-from-PsiElement-)
|
||||
* [How do I clear the read-only status of a file?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206142039-Clear-read-only-status)
|
||||
* [How can I show an editor with error highlighting in a tool window?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206146679-Error-highlighting-in-Editors)
|
||||
|
||||
|
@ -8,3 +8,13 @@ This section covers working with text in the IntelliJ Platform editor.
|
||||
* [](editor_basics.md)
|
||||
* [](text_selection.md)
|
||||
* [](multiple_carets.md)
|
||||
|
||||
## Editors FAQ
|
||||
|
||||
### How do I get the active editor instance?
|
||||
|
||||
Current select editor(s) can be queried from [`FileEditorManager`](%gh-ic%/platform/analysis-api/src/com/intellij/openapi/fileEditor/FileEditorManager.java).
|
||||
|
||||
From an [Action's `DataContext`](action_system.md#determining-the-action-context), use [`CommonDataKeys.EDITOR`](%gh-ic%/platform/editor-ui-api/src/com/intellij/openapi/actionSystem/CommonDataKeys.java).
|
||||
|
||||
For a given PSI Element, use [`PsiEditorUtil.findEditor()`](%gh-ic%/platform/editor-ui-api/src/com/intellij/psi/util/PsiEditorUtil.java)
|
||||
|
Loading…
x
Reference in New Issue
Block a user