mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 12:31:26 +07:00
IJPL-1044 wrap clinit instance requests in non-cancellable section
GitOrigin-RevId: f63849ca504a01dbae51faac27f29e69f43bff86
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1d063c0d01
commit
07f7cdaf55
@@ -4,6 +4,7 @@ package com.jetbrains.python
|
||||
import com.intellij.lang.ASTNode
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.components.service
|
||||
import com.intellij.openapi.progress.Cancellation
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.tree.IElementType
|
||||
import java.util.function.Function
|
||||
@@ -122,6 +123,10 @@ abstract class PyElementTypesFacade {
|
||||
abstract val asPatternConstructor: Function<in ASTNode, out PsiElement>
|
||||
|
||||
companion object {
|
||||
val INSTANCE: PyElementTypesFacade by lazy { ApplicationManager.getApplication().service<PyElementTypesFacade>() }
|
||||
val INSTANCE: PyElementTypesFacade by lazy {
|
||||
Cancellation.forceNonCancellableSectionInClassInitializer {
|
||||
ApplicationManager.getApplication().service<PyElementTypesFacade>()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user