IJPL-185506: add intellij.xml.psi to the frontend

GitOrigin-RevId: 005ba4903fad88f2b27fccd77694a5e4ec629bcd
This commit is contained in:
Maria Filipanova
2025-06-12 17:57:05 +02:00
committed by intellij-monorepo-bot
parent bf2ef37fb3
commit 258f392bf2
19 changed files with 47 additions and 64 deletions

View File

@@ -6,6 +6,7 @@
<module name="intellij.xml.structureView.impl" loading="embedded"/>
<module name="intellij.xml.psi" loading="embedded"/>
<module name="intellij.xml.psi.impl" loading="embedded"/>
<module name="intellij.xml.analysis" loading="embedded"/>
<module name="intellij.relaxng"/>
</content>
</idea-plugin>

View File

@@ -31,6 +31,7 @@ jvm_library(
"//platform/platform-impl:ide-impl",
"//xml/dom-openapi:dom",
"//xml/xml-psi-api:psi",
"//xml/xml-analysis-api:analysis",
"//xml/xml-psi-impl:psi-impl",
"//plugins/devkit/devkit-core:core",
"//platform/core-ui",
@@ -59,6 +60,7 @@ jvm_library(
"//platform/platform-impl:ide-impl_test_lib",
"//xml/dom-openapi:dom",
"//xml/xml-psi-api:psi",
"//xml/xml-analysis-api:analysis",
"//xml/xml-psi-impl:psi-impl",
"//plugins/devkit/devkit-core:core",
"//platform/testFramework",

View File

@@ -23,6 +23,7 @@
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
<orderEntry type="module" module-name="intellij.xml.dom" />
<orderEntry type="module" module-name="intellij.xml.psi" />
<orderEntry type="module" module-name="intellij.xml.analysis" />
<orderEntry type="module" module-name="intellij.xml.psi.impl" />
<orderEntry type="module" module-name="intellij.devkit.core" />
<orderEntry type="module" module-name="intellij.platform.testFramework" scope="TEST" />

View File

@@ -35,6 +35,7 @@ jvm_library(
"//java/java-psi-api:psi",
"//xml/dom-openapi:dom",
"//xml/xml-psi-api:psi",
"//xml/xml-analysis-api:analysis",
"//java/java-analysis-api:analysis",
"//plugins/kotlin/code-insight/intentions-shared:kotlin-code-insight-intentions-shared",
"//plugins/kotlin/code-insight/utils",

View File

@@ -35,6 +35,7 @@
<orderEntry type="module" module-name="intellij.java.psi" />
<orderEntry type="module" module-name="intellij.xml.dom" />
<orderEntry type="module" module-name="intellij.xml.psi" />
<orderEntry type="module" module-name="intellij.xml.analysis" />
<orderEntry type="module" module-name="intellij.java.analysis" />
<orderEntry type="module" module-name="kotlin.code-insight.intentions.shared" />
<orderEntry type="module" module-name="kotlin.code-insight.utils" />

View File

@@ -120,6 +120,7 @@ jvm_library(
deps = [
"//platform/platform-impl:ide-impl",
"//xml/xml-psi-api:psi",
"//xml/xml-analysis-api:analysis",
"//xml/xml-psi-impl:psi-impl",
"//plugins/properties/properties-psi-impl:backend-psi",
"//plugins/javaFX",

View File

@@ -10,6 +10,7 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
<orderEntry type="module" module-name="intellij.xml.psi" />
<orderEntry type="module" module-name="intellij.xml.analysis" />
<orderEntry type="module" module-name="intellij.xml.psi.impl" />
<orderEntry type="module" module-name="intellij.properties.backend.psi" />
<orderEntry type="module" module-name="intellij.javaFX" />

View File

@@ -0,0 +1,14 @@
<idea-plugin>
<dependencies>
<module name="intellij.platform.backend"/>
</dependencies>
<extensionPoints>
<extensionPoint name="xml.xmlSuppressionProvider" interface="com.intellij.codeInspection.XmlSuppressionProvider" dynamic="true"/>
</extensionPoints>
<extensions defaultExtensionNs="com.intellij">
<xml.xmlSuppressionProvider implementation="com.intellij.codeInspection.DefaultXmlSuppressionProvider" order="last"/>
<lang.inspectionSuppressor language="XML" implementationClass="com.intellij.codeInspection.XmlInspectionSuppressor"/>
</extensions>
</idea-plugin>

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// 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.codeInspection;

View File

@@ -0,0 +1,18 @@
// 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.codeInspection;
import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class XmlInspectionSuppressor implements InspectionSuppressor{
@Override
public boolean isSuppressedFor(@NotNull PsiElement element, @NotNull String toolId) {
return XmlSuppressionProvider.isSuppressed(element, toolId);
}
@Override
public SuppressQuickFix @NotNull [] getSuppressActions(@Nullable PsiElement element, @NotNull String toolId) {
return XmlSuppressableInspectionTool.getSuppressFixes(toolId);
}
}

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// 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.codeInspection;

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
// 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.codeInspection;

View File

@@ -146,5 +146,7 @@
<fileBasedIndex implementation="com.intellij.xml.index.XmlTagNamesIndex"/>
<fileBasedIndex implementation="com.intellij.xml.index.XmlNamespaceIndex"/>
<fileBasedIndex implementation="com.intellij.xml.index.SchemaTypeInheritanceIndex"/>
<daemon.changeLocalityDetector implementation="com.intellij.xml.XmlChangeLocalityDetector"/>
</extensions>
</idea-plugin>

View File

@@ -1,18 +1,4 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// 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.xml;
import com.intellij.codeInsight.daemon.ChangeLocalityDetector;

View File

@@ -21,9 +21,6 @@ jvm_library(
"//platform/editor-ui-api:editor-ui",
"@lib//:kotlin-stdlib",
],
runtime_deps = [
":psi_resources",
"//platform/backend",
]
runtime_deps = [":psi_resources"]
)
### auto-generated section `build intellij.xml.psi` end

View File

@@ -15,6 +15,5 @@
<orderEntry type="module" module-name="intellij.platform.util" />
<orderEntry type="module" module-name="intellij.platform.editor.ui" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
<orderEntry type="module" module-name="intellij.platform.backend" scope="RUNTIME" />
</component>
</module>

View File

@@ -1,14 +1,9 @@
<idea-plugin>
<dependencies>
<module name="intellij.platform.backend"/>
</dependencies>
<extensionPoints>
<extensionPoint name="xml.schemaProvider" interface="com.intellij.xml.XmlSchemaProvider" dynamic="true"/>
<extensionPoint name="xml.xmlTypedHandlersAdditionalSupport" interface="com.intellij.openapi.editor.XmlTypedHandlersAdditionalSupport" dynamic="true"/>
<extensionPoint name="xml.xmlCustomTagHighlightingStrategy" interface="com.intellij.openapi.editor.XmlCustomTagHighlightingStrategy" dynamic="true"/>
<extensionPoint name="xml.fileNSInfoProvider" interface="com.intellij.psi.xml.XmlFileNSInfoProvider" dynamic="true"/>
<extensionPoint name="xml.xmlSuppressionProvider" interface="com.intellij.codeInspection.XmlSuppressionProvider" dynamic="true"/>
<extensionPoint name="standardResourceProvider" interface="com.intellij.javaee.StandardResourceProvider" dynamic="true"/>
<extensionPoint name="standardResource" beanClass="com.intellij.javaee.StandardResourceEP" dynamic="true"/>
<extensionPoint name="xml.namedReferenceProvider"
@@ -26,8 +21,6 @@
<extensions defaultExtensionNs="com.intellij">
<patterns.patternClass className="com.intellij.patterns.XmlPatterns" alias="xml"/>
<inspection.basicVisitor class="com.intellij.psi.XmlElementVisitor"/>
<xml.xmlSuppressionProvider implementation="com.intellij.codeInspection.DefaultXmlSuppressionProvider" order="last"/>
<lang.inspectionSuppressor language="XML" implementationClass="com.intellij.codeInspection.XmlInspectionSuppressor"/>
<polySymbols.enableInLanguage language="HtmlCompatible"/>
</extensions>

View File

@@ -1,32 +0,0 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.codeInspection;
import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public class XmlInspectionSuppressor implements InspectionSuppressor{
@Override
public boolean isSuppressedFor(@NotNull PsiElement element, @NotNull String toolId) {
return XmlSuppressionProvider.isSuppressed(element, toolId);
}
@Override
public SuppressQuickFix @NotNull [] getSuppressActions(@Nullable PsiElement element, @NotNull String toolId) {
return XmlSuppressableInspectionTool.getSuppressFixes(toolId);
}
}

View File

@@ -84,8 +84,6 @@
<multiHostInjector implementation="com.intellij.psi.impl.source.html.HtmlConditionalCommentInjector"/>
<html.scriptContentProvider language="HTML" implementationClass="com.intellij.psi.impl.source.html.TemplateHtmlScriptContentProvider"/>
<daemon.changeLocalityDetector implementation="com.intellij.xml.XmlChangeLocalityDetector"/>
<xml.psiPolicy language="HTML" implementationClass="com.intellij.psi.impl.source.xml.behavior.HtmlPsiPolicy"/>
<xml.psiPolicy language="XHTML" implementationClass="com.intellij.psi.impl.source.xml.behavior.EncodeEachSymbolPolicy"/>