Sample code using ProgressManager/ProgressIndicator

Can anyone point me to some sample code that shows how to use the ProgressManager to display a progress dialog?

Thanks!

Todd Breiholz

2 comments

Todd Breiholz wrote:

Can anyone point me to some sample code that shows how to use the ProgressManager to display a progress dialog?

Thanks!

Todd Breiholz



ApplicationManager.getApplication().runProcessWithProgressSynchronously(new
Runnable() {
public void run() {
// Doing some activity.
ProgressIndicator indicator =
ProgressManager.getInstance().getProgressIndicator();
indicator.setText("Activity text");
indicator.setFraction(0.5); // Activity percentage
}
}, "An Activity Title", project);


--
Maxim Shafirov
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

intellij version 12.1

following code is working.

ProgressManager.getInstance().
                runProcessWithProgressSynchronously(new
                                      Runnable() {
                                          public void run() {
                                              ProgressIndicator progressIndicator =  ProgressManager.getInstance().getProgressIndicator();//(project, "New project...");
                                              progressIndicator.setFraction(0.1);
                                              ......
                                              progressIndicator.setFraction(0.8);
                                              ......
                                              progressIndicator.setFraction(1.0);

                                          }
                                      }, "title", true, project);

0

Please sign in to leave a comment.