本文整理汇总了Java中org.eclipse.jface.internal.text.html.HTMLPrinter.addParagraph方法的典型用法代码示例。如果您正苦于以下问题:Java HTMLPrinter.addParagraph方法的具体用法?Java HTMLPrinter.addParagraph怎么用?Java HTMLPrinter.addParagraph使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.internal.text.html.HTMLPrinter
的用法示例。
在下文中一共展示了HTMLPrinter.addParagraph方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: formatMultipleMessages
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
/**
* 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();
}
示例2: toHtml
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
private String toHtml(String header, String string, String errorString, boolean addPreFormatted) {
StringBuffer buffer= new StringBuffer();
HTMLPrinter.addSmallHeader(buffer, header);
if (string != null) {
if (addPreFormatted) {
HTMLPrinter.addParagraph(buffer, ""); //$NON-NLS-1$
HTMLPrinter.addPreFormatted(buffer, HTMLPrinter.convertToHTMLContent(string));
} else {
HTMLPrinter.addParagraph(buffer, string);
}
if (errorString != null) {
HTMLPrinter.addParagraph(buffer, errorString);
}
} else {
HTMLPrinter.addParagraph(buffer, JavaHoverMessages.NLSStringHover_NLSStringHover_missingKeyWarning);
}
HTMLPrinter.insertPageProlog(buffer, 0);
HTMLPrinter.addPageEpilog(buffer);
return buffer.toString();
}
示例3: formatMultipleMessages
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
@Override
protected String formatMultipleMessages(@SuppressWarnings("rawtypes") 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();
}
示例4: formatSingleMessage
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
/**
* 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();
}
示例5: formatSingleMessage
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
@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();
}
示例6: formatMultipleMessages
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
@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();
}
示例7: formatSingleMessage
import org.eclipse.jface.internal.text.html.HTMLPrinter; //导入方法依赖的package包/类
@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();
}