From d26bf7444b83049e4f68ce04260fab16368486ee Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Mon, 8 Apr 2024 13:04:55 +0200 Subject: [PATCH] file_view_providers.md: Add code formatting to titles --- .../basics/architectural_overview/file_view_providers.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/topics/basics/architectural_overview/file_view_providers.md b/topics/basics/architectural_overview/file_view_providers.md index e76e40ff7..1977841ec 100644 --- a/topics/basics/architectural_overview/file_view_providers.md +++ b/topics/basics/architectural_overview/file_view_providers.md @@ -1,4 +1,4 @@ - + # File View Providers @@ -12,21 +12,21 @@ Each of the PSI trees covers the entire contents of the file and contains specia A `FileViewProvider` instance corresponds to a single `VirtualFile`, a single `Document`, and can retrieve multiple `PsiFile` instances. -## How do I get a FileViewProvider? +## How do I get a `FileViewProvider`? | Context | API | |---------------------------------|------------------------------------------------------------------------------------------------------------------------| | [PSI File](psi_files.md) | [`PsiFile.getViewProvider()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiFile.java) | | [Virtual File](virtual_file.md) | [`PsiManager.getInstance(project).findViewProvider()`](%gh-ic%/platform/core-api/src/com/intellij/psi/PsiManager.java) | -## What can I do with a FileViewProvider? +## What can I do with a `FileViewProvider`? * To get the set of all languages for which PSI trees exist in a file: `fileViewProvider.getLanguages()` * To get the PSI tree for a particular language: `fileViewProvider.getPsi(language)`. For example, to get the PSI tree for XML, use `fileViewProvider.getPsi(XMLLanguage.INSTANCE)`. * To find an element of a particular language at the specified offset in the file: `fileViewProvider.findElementAt(offset, language)` -## How do I extend the FileViewProvider? +## How do I extend the `FileViewProvider`? To create a file type that has multiple interspersing trees for different languages, a plugin must contain an extension to the `com.intellij.fileType.fileViewProviderFactory` extension point.