From 667613c1e2715beda84d36656adf928e672157cf Mon Sep 17 00:00:00 2001 From: Karol Lewandowski Date: Tue, 9 Apr 2024 08:22:14 +0200 Subject: [PATCH] language_injection.md: Add code formatting to titles --- .../custom_language_support/language_injection.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/topics/reference_guide/custom_language_support/language_injection.md b/topics/reference_guide/custom_language_support/language_injection.md index aa53f595e..f33d70111 100644 --- a/topics/reference_guide/custom_language_support/language_injection.md +++ b/topics/reference_guide/custom_language_support/language_injection.md @@ -1,7 +1,7 @@ -# Language Injection - +# Language Injection + Injecting a language into different language elements. @@ -101,7 +101,7 @@ Both define their injections by providing XML configurations and loading them th However, custom language authors need to implement the `org.intellij.intelliLang.languageSupport` EP to make their language and PSI element patterns known to IntelliLang. Therefore, plugin authors who want to provide injections for existing languages can skip the first step. -#### Implement org.intellij.intelliLang.languageSupport EP +#### Implement `org.intellij.intelliLang.languageSupport` EP Implement the `org.intellij.intelliLang.languageSupport` EP and use [`AbstractLanguageInjectionSupport`](%gh-ic%/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/inject/AbstractLanguageInjectionSupport.java) as a base class. @@ -166,7 +166,7 @@ Therefore, you load the configuration optionally in your main plugin.xmlorg.intellij.intelliLang ```` -## LanguageInjectionContributor and LanguageInjectionPerformer +## `LanguageInjectionContributor` and `LanguageInjectionPerformer` The `com.intellij.languageInjectionContributor` EP provides injection information for the given context in terms of _what_ to inject. As a plugin author, implement [`LanguageInjectionContributor`](%gh-ic%/platform/core-api/src/com/intellij/lang/injection/general/LanguageInjectionContributor.java) to provide context-specific injections. @@ -216,7 +216,7 @@ The method `performInjection()` does the actual injection into the context PSI e > {style="note"} -## MultiHostInjector +## `MultiHostInjector` [`MultiHostInjector`](%gh-ic%/platform/core-api/src/com/intellij/lang/injection/MultiHostInjector.java) registered in `com.intellij.multiHostInjector` EP is a very low-level API, but it gives plugin authors the most freedom. It performs language injection inside other PSI elements, e.g. inject SQL inside an XML tag text or inject regular expressions into Java string literals.