public boolean isInModalProgressThread() {
   if (myExceptionalThreadWithReadAccessRunnable == null || !isExceptionalThreadWithReadAccess()) {
     return false;
   }
   ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator();
   return progressIndicator.isModal()
       && ((ProgressIndicatorEx) progressIndicator).isModalityEntered();
 }
Esempio n. 2
0
 public SmoothProgressAdapter(ProgressIndicator original, Project project) {
   myOriginal = original;
   myProject = project;
   if (myOriginal.isModal()) {
     myOriginal.setModalityProgress(this);
     this.setModalityProgress(this);
   }
 }
 public SmoothProgressAdapter(@NotNull ProgressIndicator original, @NotNull Project project) {
   myOriginal = original;
   myProject = project;
   if (myOriginal.isModal()) {
     myOriginal.setModalityProgress(this);
     setModalityProgress(this);
   }
   ProgressManager.assertNotCircular(original);
 }
 @Override
 public boolean isModal() {
   return myIndicator.isModal();
 }