/** * Creates a default information control with the given shell as parent. An information * presenter that can handle simple HTML is used to process the information to be displayed. * * @param parent the parent shell * @param statusFieldText the text to be used in the status field or <code>null</code> to hide the status field * @since 3.4 */ public DefaultInformationControl(Shell parent, String statusFieldText) { this(parent, statusFieldText, new HTMLTextPresenter(true)); }
/** * {@inheritDoc} * * @see org.eclipse.jface.text.DefaultInformationControl.IInformationPresenter#updatePresentation(org.eclipse.swt.widgets.Display, * java.lang.String, org.eclipse.jface.text.TextPresentation, int, int) * @deprecated Use {@link #updatePresentation(Drawable, String, TextPresentation, int, int)} * instead */ @Deprecated @Override public String updatePresentation(Display display, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight) { return updatePresentation((Drawable)display, hoverInfo, presentation, maxWidth, maxHeight); }
private void append(StringBuffer buffer, String string, TextPresentation presentation) { int length= string.length(); buffer.append(string); if (presentation != null) adaptTextPresentation(presentation, fCounter, length); fCounter += length; }
LineBreakingReader reader= new LineBreakingReader(createReader(hoverInfo, presentation), hoverInfo.length(), gc, maxWidth); append(buffer, LINE_DELIM, null); else { append(buffer, LINE_DELIM, presentation); if (lastLineIndent != null) append(buffer, lastLineIndent, presentation); append(buffer, line, null); firstLineProcessed= true; lastLineIndent= null; else if (lastLineIndent == null) lastLineIndent= getIndent(line); append(buffer, LINE_DELIM, lineFormatted ? presentation : null); append(buffer, HTMLMessages.getString("HTMLTextPresenter.ellipse"), presentation); //$NON-NLS-1$ return trim(buffer, presentation);
LineBreakingReader reader= new LineBreakingReader(createReader(hoverInfo, presentation), hoverInfo.length(), gc, maxWidth); append(buffer, LINE_DELIM, null); else { append(buffer, LINE_DELIM, presentation); if (lastLineIndent != null) append(buffer, lastLineIndent, presentation); append(buffer, line, null); firstLineProcessed= true; lastLineIndent= null; else if (lastLineIndent == null) lastLineIndent= getIndent(line); append(buffer, LINE_DELIM, lineFormatted ? presentation : null); append(buffer, HTMLMessages.getString("HTMLTextPresenter.ellipse"), presentation); //$NON-NLS-1$ return trim(buffer, presentation);
/** * Creates a resizable default information control with the given shell as parent. An * information presenter that can handle simple HTML is used to process the information to be * displayed. * * @param parent the parent shell * @param toolBarManager the manager or <code>null</code> if toolbar is not desired * @since 3.4 */ public DefaultInformationControl(Shell parent, ToolBarManager toolBarManager) { this(parent, toolBarManager, new HTMLTextPresenter(false)); }
/** * {@inheritDoc} * * @see org.eclipse.jface.text.DefaultInformationControl.IInformationPresenter#updatePresentation(org.eclipse.swt.widgets.Display, * java.lang.String, org.eclipse.jface.text.TextPresentation, int, int) * @deprecated Use {@link #updatePresentation(Drawable, String, TextPresentation, int, int)} * instead */ @Deprecated @Override public String updatePresentation(Display display, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight) { return updatePresentation((Drawable)display, hoverInfo, presentation, maxWidth, maxHeight); }
private void append(StringBuilder buffer, String string, TextPresentation presentation) { int length= string.length(); buffer.append(string); if (presentation != null) adaptTextPresentation(presentation, fCounter, length); fCounter += length; }
/** * Creates a default information control with the given shell as parent. An information * presenter that can handle simple HTML is used to process the information to be displayed. * * @param parent the parent shell * @param statusFieldText the text to be used in the status field or <code>null</code> to hide the status field * @since 3.4 */ public DefaultInformationControl(Shell parent, String statusFieldText) { this(parent, statusFieldText, new HTMLTextPresenter(true)); }
@Override public String updatePresentation(Drawable drawable, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight) { String warningInfo= JavaHoverMessages.JavadocHover_fallback_warning; String warning= super.updatePresentation(drawable, warningInfo, presentation, maxWidth, maxHeight); presentation.clear(); String content= super.updatePresentation(drawable, hoverInfo, presentation, maxWidth, maxHeight); return content + "\n\n" + warning; //$NON-NLS-1$ } }
/** * Creates a resizable default information control with the given shell as parent. An * information presenter that can handle simple HTML is used to process the information to be * displayed. * * @param parent the parent shell * @param toolBarManager the manager or <code>null</code> if toolbar is not desired * @since 3.4 */ public DefaultInformationControl(Shell parent, ToolBarManager toolBarManager) { this(parent, toolBarManager, new HTMLTextPresenter(false)); }
@Override public String updatePresentation(Drawable drawable, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight) { String warningInfo= JavaHoverMessages.JavadocHover_fallback_warning; String warning= super.updatePresentation(drawable, warningInfo, presentation, maxWidth, maxHeight); presentation.clear(); String content= super.updatePresentation(drawable, hoverInfo, presentation, maxWidth, maxHeight); return content + "\n\n" + warning; //$NON-NLS-1$ } }
public IInformationControl createInformationControl(Shell parent) { return new DefaultInformationControl(parent, new HTMLTextPresenter()); } };
javadocHtml= fPresenter.updatePresentation(fText, javadocHtml, fPresentation, size.width, size.height); } catch (IllegalArgumentException ex) {
@Override public IInformationControl doCreateInformationControl(Shell parent) { return new DefaultInformationControl(parent, new HTMLTextPresenter(true)); } });
javadocHtml= fPresenter.updatePresentation(fText, javadocHtml, fPresentation, size.width, size.height); } catch (IllegalArgumentException ex) {
public IInformationControl createInformationControl(Shell parent) { return new DefaultInformationControl(parent, SWT.NONE, new HTMLTextPresenter(true)); } };
public IInformationControl createInformationControl(Shell parent) { int shellStyle= SWT.RESIZE | SWT.TOOL; int style= SWT.V_SCROLL | SWT.H_SCROLL; return new DefaultInformationControl(parent, shellStyle, style, new HTMLTextPresenter(false)); } };
public IInformationControl createInformationControl(Shell parent) { return new DefaultInformationControl(parent, SWT.NONE, new HTMLTextPresenter(true)); } });
public IInformationControl createInformationControl(Shell parent) { return new DefaultInformationControl(parent, new HTMLTextPresenter()); } };