mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 11:53:49 +07:00
[polySymbols] WEB-72822 Rename various occurrences of *webSymbol* to *polySymbol* including some packages
GitOrigin-RevId: 69904cde06676d410dc30c4c340ceab556379f9f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
091140f821
commit
e1429dca8f
@@ -4463,7 +4463,7 @@
|
||||
"name": "WebTypesNpmLoader",
|
||||
"scope": "app",
|
||||
"pluginId": "JavaScript",
|
||||
"classFqn": "com.intellij.javascript.webSymbols.nodejs.WebTypesNpmLoader",
|
||||
"classFqn": "com.intellij.javascript.polySymbols.nodejs.WebTypesNpmLoader",
|
||||
"storage": "web-types-npm-loader.xml",
|
||||
"properties": [
|
||||
{
|
||||
|
||||
@@ -152,7 +152,7 @@ private val VIOLATORS : List<String> = listOf(
|
||||
"com.intellij.ide.ui.popup",
|
||||
"com.intellij.ui",
|
||||
"org.jetbrains.io",
|
||||
"com.intellij.javascript.webSymbols.nodejs.WebTypesNpmLoader",
|
||||
"com.intellij.javascript.polySymbols.nodejs.WebTypesNpmLoader",
|
||||
"com.intellij.tasks",
|
||||
"com.intellij.util.concurrency.Invoker",
|
||||
/**
|
||||
|
||||
@@ -302,7 +302,7 @@ internal open class PolySymbolMatchImpl private constructor(
|
||||
}
|
||||
|
||||
private class PolySymbolMatchPointer<T : PolySymbolMatch>(
|
||||
webSymbolMatch: PolySymbolMatchImpl,
|
||||
polySymbolMatch: PolySymbolMatchImpl,
|
||||
private val newInstanceProvider: (
|
||||
matchedName: String,
|
||||
nameSegments: List<PolySymbolNameSegment>,
|
||||
@@ -315,15 +315,15 @@ internal open class PolySymbolMatchImpl private constructor(
|
||||
) -> T,
|
||||
) : Pointer<T> {
|
||||
|
||||
private val matchedName = webSymbolMatch.matchedName
|
||||
private val nameSegments = webSymbolMatch.nameSegments
|
||||
private val matchedName = polySymbolMatch.matchedName
|
||||
private val nameSegments = polySymbolMatch.nameSegments
|
||||
.map { it.createPointer() }
|
||||
private val namespace = webSymbolMatch.namespace
|
||||
private val kind = webSymbolMatch.kind
|
||||
private val origin = webSymbolMatch.origin
|
||||
private val explicitPriority = webSymbolMatch.explicitPriority
|
||||
private val explicitProximity = webSymbolMatch.explicitProximity
|
||||
private val additionalProperties = webSymbolMatch.additionalProperties
|
||||
private val namespace = polySymbolMatch.namespace
|
||||
private val kind = polySymbolMatch.kind
|
||||
private val origin = polySymbolMatch.origin
|
||||
private val explicitPriority = polySymbolMatch.explicitPriority
|
||||
private val explicitProximity = polySymbolMatch.explicitProximity
|
||||
private val additionalProperties = polySymbolMatch.additionalProperties
|
||||
.createPointers()
|
||||
|
||||
override fun dereference(): T? =
|
||||
|
||||
@@ -334,8 +334,8 @@ fun PsiFile.findOffsetBySignature(signature: String): Int {
|
||||
|
||||
fun CodeInsightTestFixture.polySymbolAtCaret(): PolySymbol? =
|
||||
injectionThenHost(file, caretOffset) { file, offset ->
|
||||
file.webSymbolDeclarationsAt(offset).takeIf { it.isNotEmpty() }
|
||||
?: if (offset > 0) file.webSymbolDeclarationsAt(offset - 1).takeIf { it.isNotEmpty() } else null
|
||||
file.polySymbolDeclarationsAt(offset).takeIf { it.isNotEmpty() }
|
||||
?: if (offset > 0) file.polySymbolDeclarationsAt(offset - 1).takeIf { it.isNotEmpty() } else null
|
||||
}
|
||||
?.takeIf { it.isNotEmpty() }
|
||||
?.also { if (it.size > 1) throw AssertionError("Multiple PolySymbolDeclarations found at caret position: $it") }
|
||||
@@ -402,7 +402,7 @@ private fun Collection<PsiSymbolReference>.resolveToPolySymbols(): List<PolySymb
|
||||
}
|
||||
.toList()
|
||||
|
||||
private fun PsiFile.webSymbolDeclarationsAt(offset: Int): Collection<PolySymbolDeclaration> {
|
||||
private fun PsiFile.polySymbolDeclarationsAt(offset: Int): Collection<PolySymbolDeclaration> {
|
||||
for ((element, offsetInElement) in elementsAtOffsetUp(offset)) {
|
||||
val declarations = PolySymbolDeclarationProvider.getAllDeclarations(element, offsetInElement)
|
||||
if (declarations.isNotEmpty()) {
|
||||
@@ -426,9 +426,9 @@ private fun <T> injectionThenHost(file: PsiFile, offset: Int, computation: (PsiF
|
||||
}
|
||||
|
||||
fun CodeInsightTestFixture.resolveToPolySymbolSource(signature: String): PsiElement {
|
||||
val webSymbol = resolvePolySymbolReference(signature)
|
||||
val result = assertInstanceOf<PsiSourcedPolySymbol>(webSymbol).source
|
||||
assertNotNull("PolySymbol $webSymbol source is null", result)
|
||||
val polySymbol = resolvePolySymbolReference(signature)
|
||||
val result = assertInstanceOf<PsiSourcedPolySymbol>(polySymbol).source
|
||||
assertNotNull("PolySymbol $polySymbol source is null", result)
|
||||
return result!!
|
||||
}
|
||||
|
||||
|
||||
@@ -1176,7 +1176,7 @@
|
||||
{
|
||||
"key": "class",
|
||||
"type": "string",
|
||||
"value": "com.intellij.javascript.webSymbols.nodejs.PackageJsonPolySymbolsRegistryManagerStartup"
|
||||
"value": "com.intellij.javascript.polySymbols.nodejs.PackageJsonPolySymbolsRegistryManagerStartup"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -2982,7 +2982,7 @@
|
||||
{
|
||||
"key": "class",
|
||||
"type": "string",
|
||||
"value": "com.intellij.javascript.webSymbols.nodejs.PackageJsonPolySymbolsRegistryManagerStartup"
|
||||
"value": "com.intellij.javascript.polySymbols.nodejs.PackageJsonPolySymbolsRegistryManagerStartup"
|
||||
},
|
||||
{
|
||||
"key": "plugin",
|
||||
|
||||
Reference in New Issue
Block a user