Replacement for com.intellij.openapi.progress.ProgressIndicator (marked as obsolete)

Hi team,

I’m working on an IntelliJ plugin and noticed that the com.intellij.openapi.progress.ProgressIndicator interface is marked as obsolete in the latest SDK. I rely on it for tracking progress, cancellation, and switching between determinate and indeterminate states during background tasks.

Is there an officially supported replacement or recommended approach for handling progress reporting and cancellation in newer IntelliJ Platform versions?

Any guidance or documentation reference would be much appreciated. Thanks!

Hi,

its javadoc says to see com.intellij.openapi.progress.util.AbstractProgressIndicatorBase, which says to use the experimental (!) com.intellij.platform.util.progress.ProgressPipe.

BTW, ProgressIndicator is still not marked as Deprecated or Obsolete (to avoid excessive highlighting. I don’t know if this means we’ll have more time to migrate our code…). So, for now, I would say we can stick to the good old ProgressIndicator, and see what happens with ProgressPipe in a near future.

One can use it further, no worries. If you write new code and can employ coroutines then you should use withBackgroundProgress, withModalProgress and friends.

Thanks. I will check, because I want to stay compatible with 2024.3.5 for now, and I’m using Java.

Hi Yuriy,

Thanks for the clarification regarding ProgressIndicator . I understand it’s still usable, but I’m considering using the newer coroutine-based APIs like withBackgroundProgress and withModalProgress as you suggested.

To ensure a smooth migration and avoid regressions, could you help clarify:

  1. Do these newer APIs fully replace the capabilities of ProgressIndicator ?
  2. Specifically, how can we:
  • Track task cancellation (isCanceled , checkCanceled )?
  • Update progress text (setText )?
  • Switch between determinate/indeterminate states (setIndeterminate )?
  1. Is there any official migration guide or example documentation that maps commonly used ProgressIndicator methods to the new coroutine-based APIs?

Thanks again for your help!

1 Like

@yuriy.artamonov Can you please have a look into the above query?