mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[webSymbols] WebSymbolsCompoundScope - require resolve by default to avoid accidental performance problems.
(cherry picked from commit 734b1b90585b21d702dbe3b3fcf6a249ab0a4f62) IJ-CR-155990 GitOrigin-RevId: c82898d5c8d7223d7ee517759af7697cea2a5d36
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e047fd7665
commit
81c808783c
@@ -770,6 +770,7 @@
|
||||
- f:getScopes(com.intellij.webSymbols.query.WebSymbolsQueryExecutor):java.util.List
|
||||
- f:getSymbols(com.intellij.webSymbols.WebSymbolQualifiedKind,com.intellij.webSymbols.query.WebSymbolsListSymbolsQueryParams,com.intellij.util.containers.Stack):java.util.List
|
||||
- f:isExclusiveFor(com.intellij.webSymbols.WebSymbolQualifiedKind):Z
|
||||
- p:requiresResolve():Z
|
||||
*:com.intellij.webSymbols.query.WebSymbolsListSymbolsQueryParams
|
||||
- com.intellij.webSymbols.query.WebSymbolsQueryParams
|
||||
- *sf:Companion:com.intellij.webSymbols.query.WebSymbolsListSymbolsQueryParams$Companion
|
||||
|
||||
@@ -22,6 +22,7 @@ abstract class WebSymbolsCompoundScope : WebSymbolsScope {
|
||||
consumer: (WebSymbolsScope) -> Unit)
|
||||
|
||||
fun getScopes(queryExecutor: WebSymbolsQueryExecutor): List<WebSymbolsScope> {
|
||||
if (requiresResolve() && !queryExecutor.allowResolve) return emptyList()
|
||||
val list = mutableListOf<WebSymbolsScope>()
|
||||
build(queryExecutor) {
|
||||
if (it is WebSymbolsCompoundScope)
|
||||
@@ -34,6 +35,8 @@ abstract class WebSymbolsCompoundScope : WebSymbolsScope {
|
||||
return list
|
||||
}
|
||||
|
||||
protected open fun requiresResolve(): Boolean = true
|
||||
|
||||
final override fun getMatchingSymbols(qualifiedName: WebSymbolQualifiedName,
|
||||
params: WebSymbolsNameMatchQueryParams,
|
||||
scope: Stack<WebSymbolsScope>): List<WebSymbol> =
|
||||
|
||||
@@ -56,6 +56,8 @@ class WebSymbolsHtmlQueryConfigurator : WebSymbolsQueryConfigurator {
|
||||
override val priority: WebSymbol.Priority
|
||||
get() = WebSymbol.Priority.HIGHEST
|
||||
|
||||
override fun requiresResolve(): Boolean = false
|
||||
|
||||
override fun build(queryExecutor: WebSymbolsQueryExecutor, consumer: (WebSymbolsScope) -> Unit) {
|
||||
val context = location.parentOfTypes(XmlTag::class, XmlAttribute::class)
|
||||
val element = (context as? XmlTag) ?: (context as? XmlAttribute)?.parent ?: return
|
||||
|
||||
Reference in New Issue
Block a user