mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WEB-49174 "Property is not provided by any applicable directive" error when using custom directive with ng-template selector
GitOrigin-RevId: de5ec407ab28077b88fdfa5fc8f67d08c60a1e4d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dfd5fb31ff
commit
01f4719c4a
@@ -1,8 +1,6 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.webSymbols.query.impl
|
||||
|
||||
import com.intellij.find.usages.api.SearchTarget
|
||||
import com.intellij.find.usages.symbol.SearchTargetSymbol
|
||||
import com.intellij.model.Pointer
|
||||
import com.intellij.model.Symbol
|
||||
import com.intellij.openapi.project.Project
|
||||
@@ -15,6 +13,7 @@ import com.intellij.webSymbols.documentation.WebSymbolDocumentation
|
||||
import com.intellij.webSymbols.documentation.WebSymbolDocumentationTarget
|
||||
import com.intellij.webSymbols.html.WebSymbolHtmlAttributeValue
|
||||
import com.intellij.webSymbols.query.WebSymbolMatch
|
||||
import com.intellij.webSymbols.refactoring.WebSymbolRenameTarget
|
||||
import com.intellij.webSymbols.search.WebSymbolSearchTarget
|
||||
import com.intellij.webSymbols.utils.coalesceApiStatus
|
||||
import com.intellij.webSymbols.utils.merge
|
||||
@@ -141,14 +140,22 @@ internal open class WebSymbolMatchImpl private constructor(
|
||||
}
|
||||
|
||||
override val searchTarget: WebSymbolSearchTarget?
|
||||
get() = if (nameSegments.filter { it.start != it.end }
|
||||
.takeIf { it.size == 1 }
|
||||
?.get(0)
|
||||
?.symbols
|
||||
?.all { it is SearchTarget || it is SearchTargetSymbol || it.searchTarget != null } == true)
|
||||
WebSymbolSearchTarget.create(this)
|
||||
else
|
||||
null
|
||||
get() = nameSegments.filter { it.start != it.end }
|
||||
.takeIf { it.size == 1 }
|
||||
?.get(0)
|
||||
?.symbols
|
||||
?.takeIf { it.size == 1 }
|
||||
?.get(0)
|
||||
?.searchTarget
|
||||
|
||||
override val renameTarget: WebSymbolRenameTarget?
|
||||
get() = nameSegments.filter { it.start != it.end }
|
||||
.takeIf { it.size == 1 }
|
||||
?.get(0)
|
||||
?.symbols
|
||||
?.takeIf { it.size == 1 }
|
||||
?.get(0)
|
||||
?.renameTarget
|
||||
|
||||
override fun equals(other: Any?): Boolean =
|
||||
other is WebSymbolMatch
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.webSymbols.utils
|
||||
|
||||
import com.intellij.model.Pointer
|
||||
import com.intellij.webSymbols.*
|
||||
import com.intellij.webSymbols.patterns.WebSymbolsPattern
|
||||
import com.intellij.webSymbols.patterns.WebSymbolsPatternFactory
|
||||
|
||||
/**
|
||||
* A utility [WebSymbol], which allows to map
|
||||
* from one symbol to another symbol.
|
||||
*
|
||||
* The mapping will be made, if the [MappedWebSymbol.name]
|
||||
* matches exactly the queried name. As a result,
|
||||
* a reference to the symbol resolved through the
|
||||
* `mappingPath` will be created.
|
||||
*/
|
||||
class MappedWebSymbol private constructor(
|
||||
override val namespace: SymbolNamespace,
|
||||
override val kind: SymbolKind,
|
||||
override val name: String,
|
||||
override val origin: WebSymbolOrigin,
|
||||
vararg mappingPath: WebSymbolQualifiedName,
|
||||
override val priority: WebSymbol.Priority? = null,
|
||||
) : WebSymbol {
|
||||
|
||||
constructor(qualifiedKind: WebSymbolQualifiedKind,
|
||||
name: String,
|
||||
origin: WebSymbolOrigin,
|
||||
vararg mappingPath: WebSymbolQualifiedName,
|
||||
priority: WebSymbol.Priority? = null)
|
||||
: this(qualifiedKind.namespace, qualifiedKind.kind, name, origin, *mappingPath, priority = priority)
|
||||
|
||||
override val pattern: WebSymbolsPattern =
|
||||
WebSymbolsPatternFactory.createSingleSymbolReferencePattern(mappingPath.toList())
|
||||
|
||||
override fun createPointer(): Pointer<out WebSymbol> =
|
||||
Pointer.hardPointer(this)
|
||||
}
|
||||
Reference in New Issue
Block a user