use of com.intellij.openapi.progress.EmptyProgressIndicator in project intellij-plugins by StepicOrg.
the class FormListener method sendStep.
private static void sendStep(@NotNull Project project, @NotNull StepNode stepNode, @NotNull Elements elements, @NotNull StepType type, long attemptId, @Nullable String data) {
StepikApiClient stepikApiClient = authAndGetStepikApiClient(true);
StepikSubmissionsPostQuery query = stepikApiClient.submissions().post().attempt(attemptId);
Reply reply = getReply(stepNode, type, elements, data);
if (reply == null) {
return;
}
query.reply(reply).executeAsync().whenComplete(((submissions, e) -> {
if (submissions == null) {
logger.warn("Failed send step from browser", e);
StepikProjectManager.updateSelection(project);
return;
}
if (submissions.isEmpty()) {
logger.warn("Failed send step from browser", e);
return;
}
Submission submission = submissions.getFirst();
SendAction.checkStepStatus(project, stepikApiClient, stepNode, submission.getId(), new EmptyProgressIndicator());
}));
}
Aggregations