Package org.guvnor.messageconsole.events

Examples of org.guvnor.messageconsole.events.PublishBatchMessagesEvent


    @Inject
    private Event<PublishBatchMessagesEvent> publishBatchMessagesEvent;

    public void addBuildMessages( final @Observes BuildResults results ) {

        PublishBatchMessagesEvent batchMessages = new PublishBatchMessagesEvent();
        batchMessages.setCleanExisting( true );
        batchMessages.setMessageType( MessageUtils.BUILD_SYSTEM_MESSAGE );

        if ( results.getMessages() != null ) {
            for ( BuildMessage buildMessage : results.getMessages() ) {
                batchMessages.getMessagesToPublish().add( MessageUtils.convert( buildMessage ) );
            }
        }

        publishBatchMessagesEvent.fire( batchMessages );
    }
View Full Code Here


        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 );
    }
View Full Code Here

                    public void execute() {
                        view.showBusyIndicator( MessageConsoleResources.CONSTANTS.Refreshing() );
                        buildService.call( new RemoteCallback<BuildResults>() {
                            @Override
                            public void callback( final BuildResults results ) {
                                PublishBatchMessagesEvent batchMessages = new PublishBatchMessagesEvent();
                                batchMessages.setCleanExisting( true );
                                batchMessages.setMessageType( MessageUtils.BUILD_SYSTEM_MESSAGE );

                                if ( results.getMessages() != null ) {
                                    for ( BuildMessage buildMessage : results.getMessages() ) {
                                        batchMessages.getMessagesToPublish().add( MessageUtils.convert( buildMessage ) );
                                    }
                                }
                                publishBatchMessagesEvent.fire( batchMessages );
                                view.hideBusyIndicator();
                            }
View Full Code Here

TOP

Related Classes of org.guvnor.messageconsole.events.PublishBatchMessagesEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.