当前位置: 首页>>代码示例>>Java>>正文


Java HTMLPrinter.addParagraph方法代码示例

本文整理汇总了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();
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:30,代码来源:CommonAnnotationHover.java

示例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();
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:23,代码来源:NLSStringHover.java

示例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();
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:17,代码来源:ApexAnnotationHover.java

示例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();
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:21,代码来源:CommonAnnotationHover.java

示例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();
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:9,代码来源:HTMLAnnotationHover.java

示例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();
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:16,代码来源:HTMLAnnotationHover.java

示例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();
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:9,代码来源:ApexAnnotationHover.java


注:本文中的org.eclipse.jface.internal.text.html.HTMLPrinter.addParagraph方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。