From d027ba689837ff4bf80e0a6e6fc8b5f87f242a71 Mon Sep 17 00:00:00 2001 From: Piotr Tomiak Date: Tue, 25 Jul 2023 14:29:42 +0200 Subject: [PATCH] WEB-54133 Angular: improve resolution of SVG element descriptors with Web Symbols Also move most of com.intellij.html.webSymbols package from `impl` module to `xml-psi-impl` module to make it visible to `xml-analysis-impl` module and `HtmlUnknownTagInspectionBase` class. GitOrigin-RevId: d34431683f52d9abd2e9d174917a818b6607536c --- .../HtmlUnknownTagInspectionBase.java | 5 +- .../HtmlWebSymbolRenameHandlerVeto.kt | 0 .../WebSymbolsFrameworkHtmlSupport.kt | 0 .../WebSymbolsHtmlQueryConfigurator.kt | 98 +++++++++++-------- .../webSymbols/WebSymbolsHtmlTextInjector.kt | 0 .../html/webSymbols/WebSymbolsXmlExtension.kt | 2 - ...bolHtmlAttributeValueCompletionProvider.kt | 0 ...mbolHtmlAttributeValueReferenceProvider.kt | 0 .../WebSymbolAttributeDescriptor.kt | 0 .../WebSymbolAttributeDescriptorsProvider.kt | 0 .../attributes/WebSymbolHtmlAttributeInfo.kt | 0 .../WebSymbolHtmlAttributeValueTypeSupport.kt | 0 .../WebSymbolInAttributeNameRefProvider.kt | 0 .../impl/HtmlAttributeEnumConstValueSymbol.kt | 0 .../impl/WebSymbolHtmlAttributeInfoImpl.kt | 0 .../elements/WebSymbolElementDescriptor.kt | 1 - .../WebSymbolElementDescriptorsProvider.kt | 0 .../elements/WebSymbolHtmlElementInfo.kt | 0 .../elements/WebSymbolInTagNameRefProvider.kt | 0 .../impl/WebSymbolHtmlElementInfoImpl.kt | 0 .../source/html/dtd/HtmlNSDescriptorImpl.java | 2 +- 21 files changed, 61 insertions(+), 47 deletions(-) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/HtmlWebSymbolRenameHandlerVeto.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/WebSymbolsFrameworkHtmlSupport.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/WebSymbolsHtmlQueryConfigurator.kt (81%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/WebSymbolsHtmlTextInjector.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/WebSymbolsXmlExtension.kt (90%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/attributeValues/WebSymbolHtmlAttributeValueCompletionProvider.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/attributeValues/WebSymbolHtmlAttributeValueReferenceProvider.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/attributes/WebSymbolAttributeDescriptor.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/attributes/WebSymbolAttributeDescriptorsProvider.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/attributes/WebSymbolHtmlAttributeInfo.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/attributes/WebSymbolHtmlAttributeValueTypeSupport.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/attributes/WebSymbolInAttributeNameRefProvider.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/attributes/impl/HtmlAttributeEnumConstValueSymbol.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/attributes/impl/WebSymbolHtmlAttributeInfoImpl.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/elements/WebSymbolElementDescriptor.kt (99%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/elements/WebSymbolElementDescriptorsProvider.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/elements/WebSymbolHtmlElementInfo.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/elements/WebSymbolInTagNameRefProvider.kt (100%) rename xml/{impl => xml-psi-impl}/src/com/intellij/html/webSymbols/elements/impl/WebSymbolHtmlElementInfoImpl.kt (100%) diff --git a/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/HtmlUnknownTagInspectionBase.java b/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/HtmlUnknownTagInspectionBase.java index d439bd78ca18..76db486505ff 100644 --- a/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/HtmlUnknownTagInspectionBase.java +++ b/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/HtmlUnknownTagInspectionBase.java @@ -20,6 +20,7 @@ import com.intellij.codeInspection.LocalQuickFix; import com.intellij.codeInspection.ProblemHighlightType; import com.intellij.codeInspection.ProblemsHolder; import com.intellij.codeInspection.XmlQuickFixFactory; +import com.intellij.html.webSymbols.elements.WebSymbolElementDescriptor; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.Key; import com.intellij.psi.PsiElement; @@ -99,7 +100,9 @@ public class HtmlUnknownTagInspectionBase extends HtmlUnknownElementInspection { } if (isAbstractDescriptor(ownDescriptor) || - (parentDescriptor instanceof HtmlElementDescriptorImpl && + ((parentDescriptor instanceof HtmlElementDescriptorImpl + || parentDescriptor instanceof WebSymbolElementDescriptor webSymbolElementDescriptor + && !webSymbolElementDescriptor.isCustomElement()) && ownDescriptor instanceof HtmlElementDescriptorImpl && isAbstractDescriptor(descriptorFromContext))) { diff --git a/xml/impl/src/com/intellij/html/webSymbols/HtmlWebSymbolRenameHandlerVeto.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/HtmlWebSymbolRenameHandlerVeto.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/HtmlWebSymbolRenameHandlerVeto.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/HtmlWebSymbolRenameHandlerVeto.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/WebSymbolsFrameworkHtmlSupport.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/WebSymbolsFrameworkHtmlSupport.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/WebSymbolsFrameworkHtmlSupport.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/WebSymbolsFrameworkHtmlSupport.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/WebSymbolsHtmlQueryConfigurator.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/WebSymbolsHtmlQueryConfigurator.kt similarity index 81% rename from xml/impl/src/com/intellij/html/webSymbols/WebSymbolsHtmlQueryConfigurator.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/WebSymbolsHtmlQueryConfigurator.kt index f9370ccd6027..8f69b829de1a 100644 --- a/xml/impl/src/com/intellij/html/webSymbols/WebSymbolsHtmlQueryConfigurator.kt +++ b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/WebSymbolsHtmlQueryConfigurator.kt @@ -6,6 +6,7 @@ import com.intellij.html.webSymbols.elements.WebSymbolElementDescriptor import com.intellij.model.Pointer import com.intellij.openapi.project.Project import com.intellij.openapi.util.ModificationTracker +import com.intellij.openapi.util.text.StringUtil import com.intellij.psi.PsiElement import com.intellij.psi.SmartPointerManager import com.intellij.psi.XmlElementFactory @@ -14,7 +15,6 @@ import com.intellij.psi.impl.source.html.dtd.HtmlNSDescriptorImpl import com.intellij.psi.util.CachedValueProvider import com.intellij.psi.util.CachedValuesManager import com.intellij.psi.xml.XmlAttribute -import com.intellij.psi.xml.XmlElement import com.intellij.psi.xml.XmlTag import com.intellij.refactoring.suggested.createSmartPointer import com.intellij.util.asSafely @@ -42,13 +42,7 @@ class WebSymbolsHtmlQueryConfigurator : WebSymbolsQueryConfigurator { context: WebSymbolsContext, allowResolve: Boolean): List = ((element as? XmlAttribute)?.parent ?: element as? XmlTag)?.let { - listOf( - HtmlElementSymbolsScope(it.project), - HtmlElementAttributesAndEventsScope(it) - ) - } - ?: (element as? XmlElement)?.let { - listOf(HtmlElementSymbolsScope(it.project)) + listOf(StandardHtmlSymbolsScope(it)) } ?: emptyList() @@ -78,24 +72,47 @@ class WebSymbolsHtmlQueryConfigurator : WebSymbolsQueryConfigurator { @JvmStatic fun getStandardHtmlAttributeDescriptor(tag: XmlTag, attrName: String): XmlAttributeDescriptor? = getHtmlElementDescriptor(tag) - ?.getDefaultAttributeDescriptor(attrName, tag) + ?.getDefaultAttributeDescriptor(attrName.adjustCase(tag), tag) ?.takeIf { !it.getName(tag).contains(':') } private fun getHtmlElementDescriptor(tag: XmlTag): HtmlElementDescriptorImpl? = when (val tagDescriptor = tag.descriptor) { is HtmlElementDescriptorImpl -> tagDescriptor is WebSymbolElementDescriptor, is AnyXmlElementDescriptor -> { - tag.getNSDescriptor(tag.namespace, false) - .asSafely() - ?.let { nsDescriptor -> - nsDescriptor.getElementDescriptorByName(tag.localName) - ?: nsDescriptor.getElementDescriptorByName("div") - ?: nsDescriptor.getElementDescriptorByName("span") - } as? HtmlElementDescriptorImpl + getStandardHtmlElementDescriptor(tag) } else -> null } + private fun getStandardHtmlElementDescriptor(tag: XmlTag, name: String = tag.localName): HtmlElementDescriptorImpl? { + val parentTag = tag.parentTag + return if (parentTag != null) { + parentTag.getNSDescriptor(tag.namespace, false) + .asSafely() + ?.let { nsDescriptor -> + sequenceOf(parentTag.localName.adjustCase(tag), "div", "span") + .firstNotNullOfOrNull { nsDescriptor.getElementDescriptorByName(it) } + } + ?.asSafely() + ?.let { descriptor -> + sequenceOf(name.adjustCase(tag), "div", "span") + .firstNotNullOfOrNull { descriptor.getElementDescriptor(it, parentTag) } + } + ?.asSafely() + } + else { + getHtmlNSDescriptor(tag.project) + ?.let { nsDescriptor -> + sequenceOf(name.adjustCase(tag), "div", "span") + .firstNotNullOfOrNull { nsDescriptor.getElementDescriptorByName(it) } + } + ?.asSafely() + } + } + + private fun String.adjustCase(tag: XmlTag) = + if (tag.isCaseSensitive) this else StringUtil.toLowerCase(this) + fun Sequence.filterOutStandardHtmlSymbols(): Sequence = filter { it.symbol !is StandardHtmlSymbol @@ -115,7 +132,10 @@ class WebSymbolsHtmlQueryConfigurator : WebSymbolsQueryConfigurator { class HtmlSymbolsCodeCompletionItemCustomizer : WebSymbolCodeCompletionItemCustomizer { override fun customize(item: WebSymbolCodeCompletionItem, - framework: FrameworkId?, namespace: SymbolNamespace, kind: SymbolKind, location: PsiElement): WebSymbolCodeCompletionItem = + framework: FrameworkId?, + namespace: SymbolNamespace, + kind: SymbolKind, + location: PsiElement): WebSymbolCodeCompletionItem = item.let { if (namespace == WebSymbol.NAMESPACE_HTML) when (kind) { @@ -127,41 +147,21 @@ class WebSymbolsHtmlQueryConfigurator : WebSymbolsQueryConfigurator { } } - private class HtmlElementSymbolsScope(project: Project) - : WebSymbolsScopeWithCache(null, project, project, Unit) { - - override fun provides(namespace: SymbolNamespace, kind: SymbolKind): Boolean = - namespace == WebSymbol.NAMESPACE_HTML && kind == WebSymbol.KIND_HTML_ELEMENTS - - override fun getModificationCount(): Long = 0 - - override fun createPointer(): Pointer = - Pointer.hardPointer(this) - - override fun initialize(consumer: (WebSymbol) -> Unit, cacheDependencies: MutableSet) { - val descriptor = getHtmlNSDescriptor(project) ?: return - descriptor.getAllElementsDescriptors(null).forEach { - consumer(HtmlElementDescriptorBasedSymbol(it, null)) - } - descriptor.descriptorFile?.let { cacheDependencies.add(it) } - } - } - - private class HtmlElementAttributesAndEventsScope(private val tag: XmlTag) : WebSymbolsScope { + private class StandardHtmlSymbolsScope(private val tag: XmlTag) : WebSymbolsScope { override fun equals(other: Any?): Boolean = - other is HtmlElementAttributesAndEventsScope + other is StandardHtmlSymbolsScope && other.tag == tag override fun hashCode(): Int = tag.hashCode() override fun getModificationCount(): Long = 0 - override fun createPointer(): Pointer { + override fun createPointer(): Pointer { val tag = SmartPointerManager.createPointer(this.tag) return Pointer { tag.dereference()?.let { - HtmlElementAttributesAndEventsScope(it) + StandardHtmlSymbolsScope(it) } } } @@ -172,8 +172,22 @@ class WebSymbolsHtmlQueryConfigurator : WebSymbolsQueryConfigurator { params: WebSymbolsNameMatchQueryParams, scope: Stack): List = if (params.queryExecutor.allowResolve) { - if (namespace == null || namespace == WebSymbol.NAMESPACE_HTML) { + if (namespace == WebSymbol.NAMESPACE_HTML) { when (kind) { + WebSymbol.KIND_HTML_ELEMENTS -> + if (name.isNullOrEmpty()) { + (getStandardHtmlElementDescriptor(tag)?.getElementsDescriptors(tag) + ?: getHtmlNSDescriptor(tag.project)?.getAllElementsDescriptors(null) + ?: emptyArray()) + .map { HtmlElementDescriptorBasedSymbol(it, tag) } + .toList() + } + else { + getStandardHtmlElementDescriptor(tag, name) + ?.let { HtmlElementDescriptorBasedSymbol(it, tag) } + ?.match(name, scope, params) + ?: emptyList() + } WebSymbol.KIND_HTML_ATTRIBUTES -> if (name.isNullOrEmpty()) { getStandardHtmlAttributeDescriptors(tag) diff --git a/xml/impl/src/com/intellij/html/webSymbols/WebSymbolsHtmlTextInjector.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/WebSymbolsHtmlTextInjector.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/WebSymbolsHtmlTextInjector.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/WebSymbolsHtmlTextInjector.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/WebSymbolsXmlExtension.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/WebSymbolsXmlExtension.kt similarity index 90% rename from xml/impl/src/com/intellij/html/webSymbols/WebSymbolsXmlExtension.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/WebSymbolsXmlExtension.kt index 35afed49f965..3b0b5cab5b15 100644 --- a/xml/impl/src/com/intellij/html/webSymbols/WebSymbolsXmlExtension.kt +++ b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/WebSymbolsXmlExtension.kt @@ -1,9 +1,7 @@ // Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.html.webSymbols -import com.intellij.html.webSymbols.WebSymbolsHtmlQueryConfigurator.Companion.hasOnlyStandardHtmlSymbolsOrExtensions import com.intellij.html.webSymbols.attributes.WebSymbolAttributeDescriptor -import com.intellij.html.webSymbols.elements.WebSymbolElementDescriptor import com.intellij.lang.html.HTMLLanguage import com.intellij.openapi.util.TextRange import com.intellij.psi.PsiFile diff --git a/xml/impl/src/com/intellij/html/webSymbols/attributeValues/WebSymbolHtmlAttributeValueCompletionProvider.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributeValues/WebSymbolHtmlAttributeValueCompletionProvider.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/attributeValues/WebSymbolHtmlAttributeValueCompletionProvider.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributeValues/WebSymbolHtmlAttributeValueCompletionProvider.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/attributeValues/WebSymbolHtmlAttributeValueReferenceProvider.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributeValues/WebSymbolHtmlAttributeValueReferenceProvider.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/attributeValues/WebSymbolHtmlAttributeValueReferenceProvider.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributeValues/WebSymbolHtmlAttributeValueReferenceProvider.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/attributes/WebSymbolAttributeDescriptor.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributes/WebSymbolAttributeDescriptor.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/attributes/WebSymbolAttributeDescriptor.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributes/WebSymbolAttributeDescriptor.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/attributes/WebSymbolAttributeDescriptorsProvider.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributes/WebSymbolAttributeDescriptorsProvider.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/attributes/WebSymbolAttributeDescriptorsProvider.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributes/WebSymbolAttributeDescriptorsProvider.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/attributes/WebSymbolHtmlAttributeInfo.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributes/WebSymbolHtmlAttributeInfo.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/attributes/WebSymbolHtmlAttributeInfo.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributes/WebSymbolHtmlAttributeInfo.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/attributes/WebSymbolHtmlAttributeValueTypeSupport.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributes/WebSymbolHtmlAttributeValueTypeSupport.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/attributes/WebSymbolHtmlAttributeValueTypeSupport.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributes/WebSymbolHtmlAttributeValueTypeSupport.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/attributes/WebSymbolInAttributeNameRefProvider.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributes/WebSymbolInAttributeNameRefProvider.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/attributes/WebSymbolInAttributeNameRefProvider.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributes/WebSymbolInAttributeNameRefProvider.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/attributes/impl/HtmlAttributeEnumConstValueSymbol.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributes/impl/HtmlAttributeEnumConstValueSymbol.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/attributes/impl/HtmlAttributeEnumConstValueSymbol.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributes/impl/HtmlAttributeEnumConstValueSymbol.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/attributes/impl/WebSymbolHtmlAttributeInfoImpl.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributes/impl/WebSymbolHtmlAttributeInfoImpl.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/attributes/impl/WebSymbolHtmlAttributeInfoImpl.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/attributes/impl/WebSymbolHtmlAttributeInfoImpl.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/elements/WebSymbolElementDescriptor.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/elements/WebSymbolElementDescriptor.kt similarity index 99% rename from xml/impl/src/com/intellij/html/webSymbols/elements/WebSymbolElementDescriptor.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/elements/WebSymbolElementDescriptor.kt index afd43575168d..7737e47b5399 100644 --- a/xml/impl/src/com/intellij/html/webSymbols/elements/WebSymbolElementDescriptor.kt +++ b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/elements/WebSymbolElementDescriptor.kt @@ -93,7 +93,6 @@ open class WebSymbolElementDescriptor private constructor(private val tag: XmlTa getStandardHtmlElementDescriptor() ?.getElementDescriptor(childTag, contextTag) ?.let { if (it !is AnyXmlElementDescriptor) wrapInDelegating(it) else it } - ?: XmlDescriptorUtil.getElementDescriptor(childTag, contextTag) override fun getAttributesDescriptors(context: XmlTag?): Array = getStandardHtmlElementDescriptor() diff --git a/xml/impl/src/com/intellij/html/webSymbols/elements/WebSymbolElementDescriptorsProvider.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/elements/WebSymbolElementDescriptorsProvider.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/elements/WebSymbolElementDescriptorsProvider.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/elements/WebSymbolElementDescriptorsProvider.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/elements/WebSymbolHtmlElementInfo.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/elements/WebSymbolHtmlElementInfo.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/elements/WebSymbolHtmlElementInfo.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/elements/WebSymbolHtmlElementInfo.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/elements/WebSymbolInTagNameRefProvider.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/elements/WebSymbolInTagNameRefProvider.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/elements/WebSymbolInTagNameRefProvider.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/elements/WebSymbolInTagNameRefProvider.kt diff --git a/xml/impl/src/com/intellij/html/webSymbols/elements/impl/WebSymbolHtmlElementInfoImpl.kt b/xml/xml-psi-impl/src/com/intellij/html/webSymbols/elements/impl/WebSymbolHtmlElementInfoImpl.kt similarity index 100% rename from xml/impl/src/com/intellij/html/webSymbols/elements/impl/WebSymbolHtmlElementInfoImpl.kt rename to xml/xml-psi-impl/src/com/intellij/html/webSymbols/elements/impl/WebSymbolHtmlElementInfoImpl.kt diff --git a/xml/xml-psi-impl/src/com/intellij/psi/impl/source/html/dtd/HtmlNSDescriptorImpl.java b/xml/xml-psi-impl/src/com/intellij/psi/impl/source/html/dtd/HtmlNSDescriptorImpl.java index 6a69e9aa41bb..a1b481177c7d 100644 --- a/xml/xml-psi-impl/src/com/intellij/psi/impl/source/html/dtd/HtmlNSDescriptorImpl.java +++ b/xml/xml-psi-impl/src/com/intellij/psi/impl/source/html/dtd/HtmlNSDescriptorImpl.java @@ -100,7 +100,7 @@ public class HtmlNSDescriptorImpl implements XmlNSDescriptor, DumbAware, XmlNSTy for (XmlElementDescriptor element : elements) { decls.put( - element.getName(), + myCaseSensitive ? element.getName() : StringUtil.toLowerCase(element.getName()), createHtmlElementDescriptor(element) ); }