Bug 186053 [Forms] MSAA problems with FormText , role and default action
bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/Hyperlink.java
textToDraw = shortenText(gc, getText(), bounds.width);
				if (appToolTipText == null) {
					super.setToolTipText(getText());
				}
			}
			else {
				super.setToolTipText(appToolTipText);
			}
			gc.drawText(textToDraw, bounds.x, bounds.y, true);
			if (underlined) {
				int descent = gc.getFontMetrics().getDescent();
				int lineY = bounds.y + textHeight - descent + 1;
				gc.drawLine(bounds.x, lineY, bounds.x + textWidth, lineY);
			}
		}
	}
	
	protected String shortenText(GC gc, String t, int width) {
		if (t == null) return null;
		int w = gc.textExtent(ELLIPSIS).x;
		if (width<=w) return t;
		int l = t.length();
		int max = l/2;
		int min = 0;
		int mid = (max+min)/2 - 1;
		if (mid <= 0) return t;
		while (min < mid && mid < max) {
			String s1 = t.substring(0, mid);
			String s2 = t.substring(l-mid, l);
			int l1 = gc.textExtent(s1).x;