mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[threading] IJPL-148438: Hide LegacyProgressIndicatorProvider to the impl module
GitOrigin-RevId: f6679aecfb8ed8788268dead7b314303956069b9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
da2df09cfa
commit
9cead54944
@@ -197,12 +197,6 @@ interface ThreadingSupport {
|
||||
@ApiStatus.Internal
|
||||
fun removeWriteLockReacquisitionListener(listener: WriteLockReacquisitionListener)
|
||||
|
||||
@ApiStatus.Internal
|
||||
fun setLegacyIndicatorProvider(provider: LegacyProgressIndicatorProvider)
|
||||
|
||||
@ApiStatus.Internal
|
||||
fun removeLegacyIndicatorProvider(provider: LegacyProgressIndicatorProvider)
|
||||
|
||||
/**
|
||||
* Prevents any attempt to use R/W locks inside [action].
|
||||
*/
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.intellij.openapi.application.*
|
||||
import com.intellij.openapi.diagnostic.Logger
|
||||
import com.intellij.openapi.progress.Cancellation
|
||||
import com.intellij.openapi.util.text.StringUtil
|
||||
import com.intellij.platform.locking.impl.listeners.LegacyProgressIndicatorProvider
|
||||
import com.intellij.platform.locking.impl.listeners.LockAcquisitionListener
|
||||
import com.intellij.util.ReflectionUtil
|
||||
import kotlinx.coroutines.*
|
||||
@@ -842,14 +843,14 @@ class NestedLocksThreadingSupport : ThreadingSupport {
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
override fun setLegacyIndicatorProvider(provider: LegacyProgressIndicatorProvider) {
|
||||
fun setLegacyIndicatorProvider(provider: LegacyProgressIndicatorProvider) {
|
||||
if (myLegacyProgressIndicatorProvider != null)
|
||||
error("LegacyProgressIndicatorProvider already registered")
|
||||
myLegacyProgressIndicatorProvider = provider
|
||||
}
|
||||
|
||||
@ApiStatus.Internal
|
||||
override fun removeLegacyIndicatorProvider(provider: LegacyProgressIndicatorProvider) {
|
||||
fun removeLegacyIndicatorProvider(provider: LegacyProgressIndicatorProvider) {
|
||||
if (myLegacyProgressIndicatorProvider != provider)
|
||||
error("LegacyProgressIndicatorProvider is not registered")
|
||||
myLegacyProgressIndicatorProvider = null
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.openapi.application
|
||||
package com.intellij.platform.locking.impl.listeners
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
|
||||
@@ -14,4 +14,4 @@ interface LegacyProgressIndicatorProvider {
|
||||
interface LegacyProgressIndicator {
|
||||
fun checkCanceled()
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -46,6 +46,7 @@ import com.intellij.platform.diagnostic.telemetry.TelemetryManager;
|
||||
import com.intellij.platform.diagnostic.telemetry.helpers.TraceKt;
|
||||
import com.intellij.platform.locking.impl.IntelliJLockingUtil;
|
||||
import com.intellij.platform.locking.impl.NestedLocksThreadingSupport;
|
||||
import com.intellij.platform.locking.impl.listeners.LegacyProgressIndicatorProvider;
|
||||
import com.intellij.platform.locking.impl.listeners.LockAcquisitionListener;
|
||||
import com.intellij.psi.util.ReadActionCache;
|
||||
import com.intellij.ui.ComponentUtil;
|
||||
@@ -394,7 +395,7 @@ public final class ApplicationImpl extends ClientAwareComponentManager implement
|
||||
getThreadingSupport().removeWriteIntentReadActionListener(myLockDispatcherListener);
|
||||
lock.removeLockAcquisitionListener(myLockDispatcherListener);
|
||||
getThreadingSupport().removeWriteLockReacquisitionListener(myLockDispatcherListener);
|
||||
getThreadingSupport().removeLegacyIndicatorProvider(myLegacyIndicatorProvider);
|
||||
lock.removeLegacyIndicatorProvider(myLegacyIndicatorProvider);
|
||||
|
||||
//noinspection deprecation
|
||||
myDispatcher.getMulticaster().applicationExiting();
|
||||
|
||||
Reference in New Issue
Block a user