mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 18:27:49 +08:00
code_formatting.md: Block.getDebugName
This commit is contained in:
parent
37d281ba53
commit
dcfab6e2c5
@ -28,10 +28,12 @@ The formatter modifies only the characters between blocks, and the tree of block
|
||||
Otherwise, the formatter may delete the characters between blocks.
|
||||
|
||||
To better understand how to build the block structure, use [PsiViewer](explore_api.md#31-use-internal-mode-and-psiviewer) and inspect formatting blocks built for an existing language.
|
||||
To invoke PsiViewer with the possibility of inspecting Block Structure, use <menupath>Tools | View PSI Structure...</menupath> or <menupath>Tools | View PSI Structure of Current File...</menupath>:
|
||||
To invoke PsiViewer with the possibility of inspecting <control>Block Structure</control>, use <menupath>Tools | View PSI Structure...</menupath> or <menupath>Tools | View PSI Structure of Current File...</menupath>:
|
||||
|
||||
{width="720"}
|
||||
|
||||
To change the default "block name" taken from class name, return custom `Block.getDebugName()`.
|
||||
|
||||
If the formatting operation does not affect the entire file (for example, if the formatter is called to format the pasted block of text), a complete tree of blocks is not built.
|
||||
Rather, only blocks for the text range covered by the formatting operation and their parents are built.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user