mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
documents.md: handle read-only behavior
This commit is contained in:
parent
65456cc4ce
commit
8af1ef4f34
@ -69,3 +69,6 @@ This is particularly useful when you need text location/offset information about
|
|||||||
## How can I mark a region as read-only?
|
## How can I mark a region as read-only?
|
||||||
|
|
||||||
Use `Document.createGuardedBlock()`.
|
Use `Document.createGuardedBlock()`.
|
||||||
|
|
||||||
|
[`EditorActionManager.setReadonlyFragmentModificationHandler()`](%gh-ic%/platform/platform-api/src/com/intellij/openapi/editor/actionSystem/EditorActionManager.java) can
|
||||||
|
be used to customize the behavior when the user attempts to modify a read-only region.
|
||||||
|
@ -36,7 +36,6 @@ for programmatic registration.
|
|||||||
|
|
||||||
* [Why doesn't the file change on disk after I changed it through the PSI?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206791625-Action-doesn-t-see-changes-in-xml-file)
|
* [Why doesn't the file change on disk after I changed it through the PSI?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206791625-Action-doesn-t-see-changes-in-xml-file)
|
||||||
* [Can I hook into the file save logic?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206790685-Can-you-tie-into-the-file-save-logic-)
|
* [Can I hook into the file save logic?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206790685-Can-you-tie-into-the-file-save-logic-)
|
||||||
* [How do I control what happens when the user tries to edit such a part?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206791375-Using-locked-regions)
|
|
||||||
* [How can I show several editors for a single file in tabs?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206795495-Alternative-Editors-ala-HTML-Preview)
|
* [How can I show several editors for a single file in tabs?](https://intellij-support.jetbrains.com/hc/en-us/community/posts/206795495-Alternative-Editors-ala-HTML-Preview)
|
||||||
|
|
||||||
## General
|
## General
|
||||||
|
Loading…
x
Reference in New Issue
Block a user