psi_cookbook.md: formatting

This commit is contained in:
Yann Cébron 2019-12-03 12:00:03 +01:00
parent 3c0b3e4833
commit 1a1f2eb4bd

View File

@ -4,19 +4,19 @@ title: PSI Cookbook
This page gives a list of recipes for the most common operations for working with the PSI (Program Structure Interface). Unlike [Developing Custom Language Plugins](/reference_guide/custom_language_support.md), it talks about working with the PSI of existing languages (such as Java). This page gives a list of recipes for the most common operations for working with the PSI (Program Structure Interface). Unlike [Developing Custom Language Plugins](/reference_guide/custom_language_support.md), it talks about working with the PSI of existing languages (such as Java).
## How do I find a file if I know its name but don't know the path? ### How do I find a file if I know its name but don't know the path?
`FilenameIndex.getFilesByName()` `FilenameIndex.getFilesByName()`
## How do I find where a particular PSI element is used? ### How do I find where a particular PSI element is used?
`ReferencesSearch.search()` `ReferencesSearch.search()`
## How do I rename a PSI element? ### How do I rename a PSI element?
`RefactoringFactory.createRename()` `RefactoringFactory.createRename()`
## How can I cause the PSI for a virtual file to be rebuilt? ### How can I cause the PSI for a virtual file to be rebuilt?
`FileContentUtil.reparseFiles()` `FileContentUtil.reparseFiles()`