Bug 219946 [TabbedProperties] Tabbed property sheet tab titles can get truncated when selected
Build ID: M20070921-1145 Steps To Reproduce: 1.Contribute property tabs with labels that are similar lengths (but slightly different, say 2 or 3 characters) 2.Provide 16x16 pixel icons for the tabs. 3.When selected the label text tabs that are slightly longer is truncated because not enough room for the text and icon was allowed in the first place. More information: I have tracked this bug down to org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyList.setElements(). When it attempts to calculate the widest tab title item, it calculates the width of each tab title in turn and if the title has an icon it adds 16+5 pixels to the width. However, when checking this width against the current widest item, it only compares with the TEXT width of the current widest item. Therefore, unless the widest tab title text isn't at least 16+5 pixels wider than any other title text, it may not be considered to be the widest item. When checking if item is wider than current widest item, the code should take into account whether the current widest item has an icon and act accordingly. Regards Sid
bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyList.java
}
		/**
		 * Paint the element.
		 * 
		 * @param e
		 *            the paint event.
		 */
		private void paint(PaintEvent e) {
			e.gc.setBackground(widgetBackground);
			e.gc.setForeground(widgetForeground);
			Rectangle bounds = getBounds();
			if (elements.length != 0) {
				e.gc.fillRectangle(0, 0, bounds.width, bounds.height);
				e.gc.setForeground(widgetNormalShadow);
				e.gc.drawLine(bounds.width - 1, 0, bounds.width - 1,
					bounds.height - 1);
			} else {
				e.gc.setBackground(listBackground);
				e.gc.fillRectangle(0, 0, bounds.width, bounds.height);
				int textIndent = INDENT;
				FontMetrics fm = e.gc.getFontMetrics();
				int height = fm.getHeight();
				int textMiddle = (bounds.height - height) / 2;
				e.gc.setForeground(widgetForeground);
				String properties_not_available = TabbedPropertyMessages.TabbedPropertyList_properties_not_available;
				e.gc.drawText(properties_not_available, textIndent, textMiddle);
			}
			if (isUpScrollRequired()) {
				e.gc.setForeground(widgetDarkShadow);
				int middle = bounds.width / 2;