Bug 342610 [Forms] Form heading wraps text unexpectedly
Build Identifier: 20100218-1602 The form heading unexpectedly wraps heading text. A code snippet will be attached that defines a basic editor with a short form heading text string. When the editor is first displayed, there is a generous amount of horizontal space, more than sufficient to display the entire string, however, the last word form heading text appears to be truncated. If the editor is resized horizontally (shrunk), the last word of the form heading text will appear on the second line of the header. Incidentally, some longer heading text strings do not exhibit this problem. Reproducible: Always Steps to Reproduce: Display the editor defined by the attached code snippet. The last word form heading text appears to be truncated. When the editor is resized horizontally (shrunk), the last word of the form heading text will appear on the second line of the header.
bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/widgets/ExpandableComposite.java
private static final int SEPARATOR_HEIGHT = 2;
	private int expansionStyle = TWISTIE | FOCUS_TITLE | EXPANDED;
	private boolean expanded;
	private Control textClient;
	private Control client;
	private ListenerList listeners = new ListenerList();
	private Color titleBarForeground;
	private class ExpandableLayout extends Layout implements ILayoutExtension {
		private SizeCache toggleCache = new SizeCache();
		private SizeCache textClientCache = new SizeCache();
		private SizeCache textLabelCache = new SizeCache();
		private SizeCache descriptionCache = new SizeCache();
		private SizeCache clientCache = new SizeCache();
		private void initCache(boolean shouldFlush) {
			toggleCache.setControl(toggle);
			textClientCache.setControl(textClient);
			textLabelCache.setControl(textLabel);
			descriptionCache.setControl(getDescriptionControl());
			clientCache.setControl(client);
			if (shouldFlush) {
				toggleCache.flush();
				textClientCache.flush();
				textLabelCache.flush();
				descriptionCache.flush();
				clientCache.flush();
			}
		}
		protected void layout(Composite parent, boolean changed) {
			initCache(changed);
			Rectangle clientArea = parent.getClientArea();