mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 18:27:49 +08:00
documents.md: do not use deflist
This commit is contained in:
parent
d3a93e544e
commit
87b8f78185
@ -9,14 +9,14 @@ The IntelliJ Platform handles encoding and line break conversions when loading a
|
|||||||
|
|
||||||
## How do I get a Document?
|
## How do I get a Document?
|
||||||
|
|
||||||
From an Action
|
#### From an Action
|
||||||
: `e.getData(CommonDataKeys.EDITOR).getDocument()`
|
`e.getData(CommonDataKeys.EDITOR).getDocument()`
|
||||||
|
|
||||||
From a Virtual File
|
#### From a Virtual File
|
||||||
: `FileDocumentManager.getDocument()`. This call forces the document content to be loaded from disk if it wasn't loaded previously. If only open documents or documents which may have been modified are considered relevant, use `FileDocumentManager.getCachedDocument()` instead.
|
`FileDocumentManager.getDocument()`. This call forces the document content to be loaded from disk if it wasn't loaded previously. If only open documents or documents which may have been modified are considered relevant, use `FileDocumentManager.getCachedDocument()` instead.
|
||||||
|
|
||||||
From a PSI File
|
#### From a PSI File
|
||||||
: `PsiDocumentManager.getInstance().getDocument()` or `PsiDocumentManager.getInstance().getCachedDocument()`
|
`PsiDocumentManager.getInstance().getDocument()` or `PsiDocumentManager.getInstance().getCachedDocument()`
|
||||||
|
|
||||||
## What can I do with a Document?
|
## What can I do with a Document?
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user