Java Code Examples for org.eclipse.jface.internal.text.html.HTMLPrinter#convertToHTMLContent()
The following examples show how to use
org.eclipse.jface.internal.text.html.HTMLPrinter#convertToHTMLContent() .
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: DefaultEObjectHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected String getLabel (EObject o) { String text = getLabelProvider().getText(o); if(!isEmpty(text)) return HTMLPrinter.convertToHTMLContent(text); else return null; }
Example 2
Source File: XbaseHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
/** * @since 2.3 */ protected String computeSignature(EObject astElement, EObject referencedElement) { String imageTag = hoverSignatureProvider.getImageTag(referencedElement); String signature = hoverSignatureProvider.getSignature(astElement); if(signature != null) { if (imageTag != null) { return "<div style='position: absolute; left: 0; top: 0;'>" + imageTag + "</div>" + LEADING_PADDING +"<b>"+ HTMLPrinter.convertToHTMLContent(signature) + "</b>" + TRAILING_PADDING; } else { return "<b>"+ HTMLPrinter.convertToHTMLContent(signature) + "</b>" + TRAILING_PADDING; } } return ""; }
Example 3
Source File: JavaDoc2HTMLTextReader.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private String printLiteral(String tagContent) { int contentStart= 0; for (int i= 0; i < tagContent.length(); i++) { if (! Character.isWhitespace(tagContent.charAt(i))) { contentStart= i; break; } } return HTMLPrinter.convertToHTMLContent(tagContent.substring(contentStart)); }