publishBatchMessagesEvent.fire( batchMessages );
}
public void addIncrementalBuildMessages( final @Observes IncrementalBuildResults results ) {
PublishBatchMessagesEvent batchMessages = new PublishBatchMessagesEvent();
batchMessages.setMessageType( MessageUtils.BUILD_SYSTEM_MESSAGE );
if ( results.getAddedMessages() != null ) {
for ( BuildMessage buildMessage : results.getAddedMessages() ) {
batchMessages.getMessagesToPublish().add( MessageUtils.convert( buildMessage ) );
}
}
if ( results.getRemovedMessages() != null ) {
for ( BuildMessage buildMessage : results.getRemovedMessages() ) {
batchMessages.getMessagesToUnpublish().add( MessageUtils.convert( buildMessage ) );
}
}
publishBatchMessagesEvent.fire( batchMessages );
}