Bug 245155 [TabbedProperties] IllegalArgumentException: Argument not valid
Steps to reproduce. 1. Open two editors that use the tabbed properties. I was using a WTP 3.1 driver (S-3.1M1-20080825023321) and opened up any two of the following editors: Web Page Editor, or DTD Editor, or WSDL Editor, or XML Schema Editor 2. Close one editor. You'll get the IllegalArgumentException. (See below). After this, any subsequent input changes to the properties view will result in this exception. Also the Tab text is not drawn, other than the one that is currently selected. I also tried closing and reopening the properties view, and the text is still not drawn. java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:3761) at org.eclipse.swt.SWT.error(SWT.java:3695) at org.eclipse.swt.SWT.error(SWT.java:3666) at org.eclipse.swt.graphics.GC.setForeground(GC.java:4178) at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyList$BottomNavigationElement.paint(TabbedPropertyList.java:443) at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyList$BottomNavigationElement.access$0(TabbedPropertyList.java:431) at org.eclipse.ui.internal.views.properties.tabbed.view.TabbedPropertyList$7.paintControl(TabbedPropertyList.java:406) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:217) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012) at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1424) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3842) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:337) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4541) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2378) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3420) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
bundles/org.eclipse.ui.views.properties.tabbed/src/org/eclipse/ui/internal/views/properties/tabbed/view/TabbedPropertyList.java
* 
	 * @return the height of a tab.
	 */
	private int getTabHeight() {
		int tabHeight = getTextDimension("").y + INDENT;  
		if (tabsThatFitInComposite == 1) {
			/*
			 * if only one tab will fix, reduce the size of the tab height so
			 * that the navigation elements fit.
			 */
			int ret = getBounds().height - 20;
			return (ret > tabHeight) ? tabHeight
				: (ret < 5) ? 5
					: ret;
		}
		return tabHeight;
	}
	/**
	 * Determine if a downward scrolling is required.
	 * 
	 * @return true if downward scrolling is required.
	 */
	private boolean isDownScrollRequired() {
		return elements.length > tabsThatFitInComposite
			&& bottomVisibleIndex != elements.length - 1;
	}
	/**
	 * Determine if an upward scrolling is required.
	 * 
	 * @return true if upward scrolling is required.