[Rider] RIDER-113957 Make the Patch Engine via typing assist be the only way to synchronize the .NET web templates

(cherry picked from commit 0e40917a5d7a0dbf42677afea9df5c1ac4487957)

IJ-CR-155987

GitOrigin-RevId: 595cf12ccf10de90f7ff88fe2987931e9fb1aa62
This commit is contained in:
Egor.Skrypnikov
2025-02-21 21:14:42 +01:00
committed by intellij-monorepo-bot
parent af04ae3074
commit 1bbdd0e518
2 changed files with 18 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.codeInsight.editorActions;
import org.jetbrains.annotations.ApiStatus;
/**
* A marker interface for the languages that have an external tag synchronizer attached and that don't need the tag synchronization from the
* {@link XmlTagNameSynchronizer}
*/
@ApiStatus.Internal
public interface ExternallyTagSynchronizedLanguage {
}

View File

@@ -112,8 +112,12 @@ public final class XmlTagNameSynchronizer implements EditorFactoryListener {
final PsiFile psiFile = file != null && file.isValid() ? PsiManager.getInstance(project).findFile(file) : null;
if (psiFile != null) {
for (Language language : psiFile.getViewProvider().getLanguages()) {
if ((ContainerUtil.find(SUPPORTED_LANGUAGES, language::isKindOf) != null) && !(language instanceof TemplateLanguage) ||
XmlTypedHandlersAdditionalSupport.supportsTypedHandlers(psiFile, language)) {
if (
(ContainerUtil.find(SUPPORTED_LANGUAGES, language::isKindOf) != null)
&& !(language instanceof TemplateLanguage)
&& !(language instanceof ExternallyTagSynchronizedLanguage)
|| XmlTypedHandlersAdditionalSupport.supportsTypedHandlers(psiFile, language)
) {
return language;
}
}