Java Code Examples for org.eclipse.jface.internal.text.html.HTMLPrinter#addPageProlog()
The following examples show how to use
org.eclipse.jface.internal.text.html.HTMLPrinter#addPageProlog() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CommonAnnotationHover.java From APICloud-Studio with GNU General Public License v3.0 | 6 votes |
/** * Hook method to formats the given messages. * <p> * Subclasses can change this to create a different format like HTML. * </p> * * @param messages * the messages to format (element type: {@link String}) * @return the formatted message */ @SuppressWarnings("rawtypes") protected String formatMultipleMessages(List messages) { StringBuffer buffer = new StringBuffer(); HTMLPrinter.addPageProlog(buffer); HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(Messages.CommonAnnotationHover_multipleMarkersMessage)); HTMLPrinter.startBulletList(buffer); Iterator e = messages.iterator(); while (e.hasNext()) { HTMLPrinter.addBullet(buffer, HTMLPrinter.convertToHTMLContent((String) e.next())); } HTMLPrinter.endBulletList(buffer); HTMLPrinter.addPageEpilog(buffer); return buffer.toString(); }
Example 2
Source File: CommonAnnotationHover.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
/** * Hook method to format the given single message. * <p> * Subclasses can change this to create a different format like HTML. * </p> * * @param message * the message to format * @return the formatted message */ protected String formatSingleMessage(String message) { StringBuffer buffer = new StringBuffer(); HTMLPrinter.addPageProlog(buffer); HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(message)); HTMLPrinter.addPageEpilog(buffer); return buffer.toString(); }
Example 3
Source File: HTMLAnnotationHover.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected String formatSingleMessage(String message) { StringBuffer buffer= new StringBuffer(); HTMLPrinter.addPageProlog(buffer); HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(message)); HTMLPrinter.addPageEpilog(buffer); return buffer.toString(); }
Example 4
Source File: HTMLAnnotationHover.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
@Override protected String formatMultipleMessages(List messages) { StringBuffer buffer= new StringBuffer(); HTMLPrinter.addPageProlog(buffer); HTMLPrinter.addParagraph(buffer, HTMLPrinter.convertToHTMLContent(JavaUIMessages.JavaAnnotationHover_multipleMarkersAtThisLine)); HTMLPrinter.startBulletList(buffer); Iterator<?> e= messages.iterator(); while (e.hasNext()) HTMLPrinter.addBullet(buffer, HTMLPrinter.convertToHTMLContent((String) e.next())); HTMLPrinter.endBulletList(buffer); HTMLPrinter.addPageEpilog(buffer); return buffer.toString(); }