void (@NotNull AnActionEvent e) { final Project project = e.getData(CommonDataKeys.PROJECT); for (int i = 0; i < 100; i++) { final int finalI = i; new Task.Backgroundable(project, "Test process", true, PerformInBackgroundOption.ALWAYS_BACKGROUND) { @Override public void run(final @NotNull ProgressIndicator indicator) { for (int j = 0; j < 10000; j++) { TimeoutUtil.sleep(1); indicator.setText("foo " + j); if (finalI % 10 == 0) { indicator.setText2(j + " foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo"); } } } }.queue(); } }