Bug 170827 ControlDecoration uses the wrong GC method to render text
The constructor of the Hover in ControlDecoration: hoverShell.addPaintListener(new PaintListener() { public void paintControl(PaintEvent pe) { pe.gc.drawString(text, hm, hm); if (!CARBON) { pe.gc.drawPolygon(getPolygon(true)); } } }); The size of the hover is correctly performed when there are carriage returns in the text. However, the text is painted as String. This causes only the first line to be painted and the rest of the hover is empty. The fix is to use GC.drawText' instead.
bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/ControlDecoration.java
* ensures adequate space is allocated for any field decorations by creating a
 * composite that parents the decorations and fields, and reserving space for
 * any decorations added to the field. ControlDecoration simply renders the
 * image adjacent to the specified (already created) control, with no guarantee
 * that it won't be clipped or otherwise obscured or overlapped by adjacent
 * controls, including another ControlDecoration placed in the same location.
 * The tradeoff is one of guaranteed placement (via {@link DecoratedField}) vs.
 * more flexibility in creating the control, using ControlDecoration, along with
 * less concern for aligning decorated and non-decorated fields.
 * <p>
 * Clients using ControlDecoration should typically ensure that enough margin
 * space is reserved for a decoration by altering the layout data margins,
 * although this is not assumed or required by the ControlDecoration
 * implementation.
 * <p>
 * This class is intended to be instantiated and used by clients. It is not
 * intended to be subclassed by clients.
 * 
 * <p>
 * <strong>EXPERIMENTAL</strong> This class or interface has been added as part
 * of a work in progress. This API may change at any given time. Please do not
 * use this API without consulting with the Platform/UI team.
 * 
 * @since 3.3
 * 
 * @see FieldDecoration
 * @see FieldDecorationRegistry
 * @see DecoratedField
 */
public class ControlDecoration {