Package org.eclipse.ui.forms

Examples of org.eclipse.ui.forms.IMessage


  String createFormTextContent(IMessage[] messages) {
    StringWriter sw = new StringWriter();
    PrintWriter pw = new PrintWriter(sw);
    pw.println("<form>");
    for (int i = 0; i < messages.length; i++) {
      IMessage message = messages[i];
      pw
          .print("<li vspace=\"false\" style=\"image\" indent=\"16\" value=\"");
      switch (message.getMessageType()) {
      case IMessageProvider.ERROR:
        pw.print("error");
        break;
      case IMessageProvider.WARNING:
        pw.print("warning");
        break;
      case IMessageProvider.INFORMATION:
        pw.print("info");
        break;
      }
      pw.print("\"> <a href=\"");
      pw.print(i+"");
      pw.print("\">");
      if (message.getPrefix() != null)
        pw.print(message.getPrefix());
      pw.print(message.getMessage());
      pw.println("</a></li>");
    }
    pw.println("</form>");
    pw.flush();
    return sw.toString();
View Full Code Here

TOP

Related Classes of org.eclipse.ui.forms.IMessage

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.