void (UUID sessionId, CmdlineRemoteProto.Message.BuilderMessage.BuildEvent event) { if (myProject.isDisposed()) { return; } switch (event.getEventType()) { case BUILD_COMPLETED -> { myContext.getProgressIndicator().stop(); if (event.hasCompletionStatus()) { final CmdlineRemoteProto.Message.BuilderMessage.BuildEvent.Status status = event.getCompletionStatus(); updateBuildStatus(status); if (status == CmdlineRemoteProto.Message.BuilderMessage.BuildEvent.Status.CANCELED) { myContext.getProgressIndicator().cancel(); } } final int errors = myContext.getMessageCount(CompilerMessageCategory.ERROR); final int warnings = myContext.getMessageCount(CompilerMessageCategory.WARNING); SwingUtilities.invokeLater(() -> { if (myProject.isDisposed()) { return; } final CompilationStatusListener publisher = myProject.getMessageBus().syncPublisher(CompilerTopics.COMPILATION_STATUS); publisher.automakeCompilationFinished(errors, warnings, myContext); }); } case FILES_GENERATED -> { final CompilationStatusListener publisher = myProject.getMessageBus().syncPublisher(CompilerTopics.COMPILATION_STATUS); for (CmdlineRemoteProto.Message.BuilderMessage.BuildEvent.GeneratedFile generatedFile : event.getGeneratedFilesList()) { final String root = FileUtil.toSystemIndependentName(generatedFile.getOutputRoot()); final String relativePath = FileUtil.toSystemIndependentName(generatedFile.getRelativePath()); publisher.fileGenerated(root, relativePath); } } case CUSTOM_BUILDER_MESSAGE -> { if (event.hasCustomBuilderMessage()) { final CmdlineRemoteProto.Message.BuilderMessage.BuildEvent.CustomBuilderMessage message = event.getCustomBuilderMessage(); if (GlobalOptions.JPS_SYSTEM_BUILDER_ID.equals(message.getBuilderId()) && GlobalOptions.JPS_UNPROCESSED_FS_CHANGES_MESSAGE_ID.equals(message.getMessageType())) { myUnprocessedFSChangesDetected = true; } } } default -> {} } }