Class Message

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String description  
      private Status status  
    • Constructor Summary

      Constructors 
      Constructor Description
      Message​(java.lang.String description, Status status)
      Creates a message.
    • Field Detail

      • description

        private java.lang.String description
      • status

        private Status status
    • Constructor Detail

      • Message

        public Message​(java.lang.String description,
                       Status status)
        Creates a message.
        Parameters:
        description - the message description
        status - the status of the message
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: IMessage
        Returns the message description.
        Specified by:
        getDescription in interface IMessage
        Returns:
        the message description
      • getDetailedDescription

        public java.lang.String getDetailedDescription()
        Description copied from interface: IMessage
        Returns a detailed message description (if available) or IMessage.getDescription(). Details may e.g., include file position or line number. As e.g. xText cares for location and position itself, this information would be superfluous there, but helpful in a command line context, where this method shall be used instead.
        Specified by:
        getDetailedDescription in interface IMessage
        Returns:
        the (detailed) message description
      • getStatus

        public Status getStatus()
        Description copied from interface: IMessage
        Returns the status of this message.
        Specified by:
        getStatus in interface IMessage
        Returns:
        the status of this message
      • containsError

        public static boolean containsError​(java.util.List<Message> messages)
        Utility method returning whether there is an error message in the given messages.
        Parameters:
        messages - the messages (may be null)
        Returns:
        true if there is an error, false else
      • toString

        public static java.lang.String toString​(java.util.List<Message> messages,
                                                Status filter)
        Utility method returning a string representation of a given set of messages.
        Parameters:
        messages - the messages (may be null)
        filter - just messages of the given status shall be returned (null for all)
        Returns:
        the string representation