mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
Adding some CancellationCheck.runWithCancellationCheck
GitOrigin-RevId: 5c2ec8ecc78122d115c721ac25e2559a63a1671e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ab3b050a6b
commit
7161c8bf6b
@@ -14,5 +14,6 @@
|
||||
<orderEntry type="module" module-name="intellij.platform.lang" />
|
||||
<orderEntry type="library" name="Trove4j" level="project" />
|
||||
<orderEntry type="module" module-name="intellij.platform.indexing.impl" />
|
||||
<orderEntry type="module" module-name="intellij.platform.ide.impl" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2020 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.
|
||||
package com.intellij.psi
|
||||
|
||||
import com.intellij.openapi.progress.impl.CancellationCheck
|
||||
import com.intellij.util.ProcessingContext
|
||||
import org.jetbrains.uast.UElement
|
||||
|
||||
@@ -9,7 +10,7 @@ internal class UastReferenceProviderAdapter(private val supportedUElementTypes:
|
||||
|
||||
override fun getReferencesByElement(element: PsiElement, context: ProcessingContext): Array<PsiReference> {
|
||||
val uElement = UastPatternAdapter.getOrCreateCachedElement(element, context, supportedUElementTypes) ?: return PsiReference.EMPTY_ARRAY
|
||||
return provider.getReferencesByElement(uElement, context)
|
||||
return CancellationCheck.runWithCancellationCheck { provider.getReferencesByElement (uElement, context) }
|
||||
}
|
||||
|
||||
override fun acceptsTarget(target: PsiElement): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user