IntelliJ Platform Plugin SDK
 
IntelliJ Platform Explorer

File View Providers

Edit pageLast modified: 08 April 2024

A file view provider (FileViewProvider) manages access to multiple PSI trees within a single file.

For example, a JSPX page has a separate PSI tree for the Java code in it (PsiJavaFile), a separate tree for the XML code (XmlFile), and a separate tree for JSP as a whole (JspFile).

Each of the PSI trees covers the entire contents of the file and contains special "outer language elements" in the places where contents in a different language can be found.

A FileViewProvider instance corresponds to a single VirtualFile, a single Document, and can retrieve multiple PsiFile instances.