From a1b3324aa92eea917d974c8f0340bb73642e8a0b Mon Sep 17 00:00:00 2001 From: Nikita Katkov Date: Tue, 22 Oct 2024 16:31:10 +0200 Subject: [PATCH] [yaml] IJ-CR-147338 Add documentation to the recently introduced extension point (cherry picked from commit e524f4c59adab9ef6877df039d53ad57cd5cc2a8) GitOrigin-RevId: debd6e9731ef923e285554bb44a42036d954752e --- .../src/org/jetbrains/yaml/psi/YamlTagRecogniser.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/yaml/editing/src/org/jetbrains/yaml/psi/YamlTagRecogniser.kt b/plugins/yaml/editing/src/org/jetbrains/yaml/psi/YamlTagRecogniser.kt index 488cdcf5ffb1..cf52fd42c8f5 100644 --- a/plugins/yaml/editing/src/org/jetbrains/yaml/psi/YamlTagRecogniser.kt +++ b/plugins/yaml/editing/src/org/jetbrains/yaml/psi/YamlTagRecogniser.kt @@ -2,12 +2,23 @@ package org.jetbrains.yaml.psi import com.intellij.openapi.extensions.ExtensionPointName import com.intellij.openapi.util.NlsSafe +import org.jetbrains.annotations.ApiStatus +/** + * Interface for recognising known domain-specific YAML tags. + * + * This interface allows implementations to inform the IDE about YAML tags that are expected in a particular YAML-based framework. + * If a tag is recognised by any implementation, no warnings will be reported in the editor. + */ +@ApiStatus.Experimental interface YamlTagRecogniser { companion object { @JvmField val EP_NAME = ExtensionPointName.create("com.intellij.yaml.tagRecogniser") } + /** + * Checks if the provided tag text is recognised as a known domain-specific YAML tag. + */ fun isRecognizedTag(tagText: @NlsSafe String): Boolean } \ No newline at end of file