[yaml] IJPL-64341 IJ-CR-147338 Implement gitlab YAML tags support on the gitlab plugin side

A dedicated optional content module was created because gitlab plugin does not have a YAML dependency

(cherry picked from commit d4cd67d49c6ac38319b17118f0c8bd44ebaeff1d)

GitOrigin-RevId: 604125375d2c3aae22ccbda74251d5468c7ad863
This commit is contained in:
Nikita Katkov
2024-10-18 17:24:57 +02:00
committed by intellij-monorepo-bot
parent e8ae304c95
commit a4512869b5
4 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="intellij.vcs.gitlab" />
<orderEntry type="module" module-name="intellij.yaml" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="module" module-name="intellij.platform.util.base" />
</component>
</module>

View File

@@ -0,0 +1,10 @@
<idea-plugin package="org.jetbrains.plugins.gitlab.yaml">
<dependencies>
<plugin id="org.jetbrains.plugins.yaml"/>
</dependencies>
<extensions defaultExtensionNs="com.intellij">
<yaml.tagRecogniser implementation="org.jetbrains.plugins.gitlab.yaml.GitlabYamlTagRecogniser"/>
</extensions>
</idea-plugin>

View File

@@ -0,0 +1,13 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.plugins.gitlab.yaml
import com.intellij.openapi.util.NlsSafe
import org.jetbrains.yaml.psi.YamlTagRecogniser
internal class GitlabYamlTagRecogniser: YamlTagRecogniser {
private val knownGithubYamlTags = setOf("!reference")
override fun isRecognizedTag(tagText: @NlsSafe String): Boolean {
return knownGithubYamlTags.contains(tagText)
}
}

View File

@@ -43,6 +43,10 @@
<module name="intellij.platform.collaborationTools"/>
</dependencies>
<content>
<module name="intellij.vcs.gitlab.yaml"/>
</content>
<extensionPoints>
<extensionPoint qualifiedName="intellij.vcs.gitlab.titleGenerator"
interface="org.jetbrains.plugins.gitlab.mergerequest.ui.create.model.GitLabTitleGeneratorExtension"