mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
editors.md: use table
This commit is contained in:
parent
5481300cef
commit
c955733d2f
@ -17,11 +17,11 @@ This section covers working with text in the IntelliJ Platform editor:
|
|||||||
|
|
||||||
### How do I get the active editor instance?
|
### 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).
|
| Context | API |
|
||||||
|
|----------------------------|---------------------------------------------------------------------------------------------------------------------|
|
||||||
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).
|
| Generic | [`FileEditorManager`](%gh-ic%/platform/analysis-api/src/com/intellij/openapi/fileEditor/FileEditorManager.java) |
|
||||||
|
| [Action](action_system.md) | [`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)
|
| [](psi_elements.md) | [`PsiEditorUtil.findEditor()`](%gh-ic%/platform/editor-ui-api/src/com/intellij/psi/util/PsiEditorUtil.java) |
|
||||||
|
|
||||||
### How can I be notified about editor events?
|
### How can I be notified about editor events?
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user