IdeMessageManagerAccess.printMessage(IdeMessageType.INFORMATION, "Lesson8 script: started");
IdeProgressIndicator progressIndicator = IdeProgressIndicatorAccess.getProgressIndicator();
IdeProgress progress = progressIndicator.start("myID", true, 70,
"Step {0, number, integer} of {1, number, integer}. {3, number, percent} completed. ({2})");
for (int i = 0; i < 70; i++) {
if (progress.isCancelRequested()) {
break;
}
try { Thread.sleep(600); }
catch(Exception e) { }
progress.setCount(i);
if (i % 10 == 0) {
progress.setStep(getDescription(i / 10));
}
}
progress.stop();
IdeMessageManagerAccess.printMessage(IdeMessageType.INFORMATION, "Lesson8 script: finished");