Minor, add workaround for KT-43812
This commit is contained in:
committed by
TeamCityServer
parent
2b22cbcdd2
commit
8fedfd2d2a
@@ -23,12 +23,15 @@ import java.util.concurrent.TimeoutException
|
|||||||
* Copied from [com.intellij.openapi.progress.util.ProgressIndicatorUtils]
|
* Copied from [com.intellij.openapi.progress.util.ProgressIndicatorUtils]
|
||||||
*/
|
*/
|
||||||
object ProgressIndicatorUtils {
|
object ProgressIndicatorUtils {
|
||||||
|
@Suppress("ObjectLiteralToLambda") // Workaround for KT-43812.
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun <T> underModalProgress(
|
fun <T> underModalProgress(
|
||||||
project: Project,
|
project: Project,
|
||||||
@Nls progressTitle: String,
|
@Nls progressTitle: String,
|
||||||
computable: () -> T
|
computable: () -> T
|
||||||
): T = com.intellij.openapi.actionSystem.ex.ActionUtil.underModalProgress(project, progressTitle, computable)
|
): T = com.intellij.openapi.actionSystem.ex.ActionUtil.underModalProgress(project, progressTitle, object : Computable<T> {
|
||||||
|
override fun compute(): T = computable()
|
||||||
|
})
|
||||||
|
|
||||||
fun <T> runUnderDisposeAwareIndicator(
|
fun <T> runUnderDisposeAwareIndicator(
|
||||||
parent: Disposable,
|
parent: Disposable,
|
||||||
|
|||||||
Reference in New Issue
Block a user