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, it talks about working with the PSI of existing languages (such as Java).
FilenameIndex.getFilesByName()
ReferencesSearch.search()
RefactoringFactory.createRename()
FileContentUtil.reparseFiles()
ClassInheritorsSearch.search()
JavaPsiFacade.findClass()
PsiShortNamesCache.getInstance().getClassesByName()
PsiClass.getSuperClass()
PsiJavaFile javaFile = (PsiJavaFile) psiClass.getContaningFile();
PsiPackage pkg = JavaPsiFacade.getInstance(project).findPackage(javaFile.getPackageName());
OverridingMethodsSearch.search()