/** * Implement this method to draw a graphical representation of this * annotation within the given bounds. This default implementation does * nothing. * <p> * Note: This is only for backward compatibility. * </p> * @param gc the drawing GC * @param canvas the canvas to draw on * @param r the bounds inside the canvas to draw on * @deprecated As of 3.0 replaced by {@link org.eclipse.jface.text.source.IAnnotationAccessExtension#paint(org.eclipse.jface.text.source.Annotation, GC, Canvas, Rectangle)} * @since 3.0 */ @Deprecated public void paint(GC gc, Canvas canvas, Rectangle r) { Image image= getImage(canvas.getDisplay()); if (image != null) ImageUtilities.drawImage(image, gc, canvas, r, SWT.CENTER, SWT.TOP); }
/** * Implement this method to draw a graphical representation of this * annotation within the given bounds. This default implementation does * nothing. * <p> * Note: This is only for backward compatibility. * </p> * @param gc the drawing GC * @param canvas the canvas to draw on * @param r the bounds inside the canvas to draw on * @deprecated As of 3.0 replaced by {@link org.eclipse.jface.text.source.IAnnotationAccessExtension#paint(org.eclipse.jface.text.source.Annotation, GC, Canvas, Rectangle)} * @since 3.0 */ public void paint(GC gc, Canvas canvas, Rectangle r) { Image image= getImage(canvas.getDisplay()); if (image != null) ImageUtilities.drawImage(image, gc, canvas, r, SWT.CENTER, SWT.TOP); }
/** * Returns an image for this annotation. It first consults the workbench * adapter for this annotation's marker. If none is defined, it tries to * find an image for the image name of this annotation. * * @param display the display for which the image is requested * @return the image for this annotation * @deprecated As of 3.0, visual presentation is no longer supported, * annotation with a visible presentation should implement * {@link org.eclipse.jface.text.source.IAnnotationPresentation} */ @Deprecated protected Image getImage(Display display) { if (fImage == null) { IMarker marker= getMarker(); if (marker.exists()) { IWorkbenchAdapter adapter= marker.getAdapter(IWorkbenchAdapter.class); if (adapter != null) { ImageDescriptor descriptor= adapter.getImageDescriptor(marker); if (descriptor != null) fImage= getImage(display, descriptor); } } if (fImage == null) fImage= getImage(fImageName); } return fImage; }