Bug 161848 [JFace] Javadoc quality in org.eclipse.jface
As Tod announced on the platform-ui mailing list he wants to set the compiler settings to stricter mode so to ensure the javadoc quality. Because the weather was so lousy in Austria today I tried it and took the effort (~2 hours). I'll attach the patches package wise. This is a starting point.
bundles/org.eclipse.jface/src/org/eclipse/jface/action/ActionContributionItem.java
/**
     * Shorten the given text <code>t</code> so that its length doesn't
     * exceed the given width. The default implementation replaces characters
     * in the center of the original string with an ellipsis ("..."). Override
     * if you need a different strategy.
     */
    protected String shortenText(String textValue, ToolItem item) {
        if (textValue == null) {
			return null;
		}
        GC gc = new GC(item.getParent());
        int maxWidth = item.getImage().getBounds().width * 4;
        if (gc.textExtent(textValue).x < maxWidth) {
            gc.dispose();
            return textValue;
        }
        for (int i = textValue.length(); i > 0; i--) {
            String test = textValue.substring(0, i);
            test = test + ellipsis;
            if (gc.textExtent(test).x < maxWidth) {
                gc.dispose();
                return test;
            }
        }
        gc.dispose();
        
        return textValue;
    }
}