How to update status of ProgressIndicator from within GlobalInspectionContextExtension

I have source code like:

public class MyInspectionContext implements GlobalInspectionContextExtension< MyInspectionContext > {
          @Override
          public void performPreRunActivities(...) {
                 ProgressManager.getInstance().getProgressIndicator().setFraction(0.01);
                 ProgressManager.getInstance().getProgressIndicator().setText("Test");
                 ProgressManager.getInstance().getProgressIndicator().setText2("change me");
                 ... code which takes more then a minute ...
          }
}



But any actions on setFraction() or setText() seems to have no effect, instead you always see "Inspecting Code...".
How to change the status information of the progressIndicator within GlobalInspectionContextExtension?

2 comments
Comment actions Permalink

See org.jetbrains.android.inspections.lint.AndroidLintGlobalInspectionContext#performPreRunActivities on how to access ProgressIndicator in this context.

0
Comment actions Permalink

many thx,

ProgressWrapper.unwrap(progressIndicator).setText(message);


did the trick.

0

Please sign in to leave a comment.