Bug 43415 [Dialogs] SWTException from ProgressIndicator
Nightly build 20030922 - Run a test using the JUnit Plugin launcher. - When finished, the following exception is printed to the log. org.eclipse.swt.SWTException: Widget is disposed at org.eclipse.swt.SWT.error(SWT.java:2369) at org.eclipse.swt.SWT.error(SWT.java:2299) at org.eclipse.swt.widgets.Widget.error(Widget.java:388) at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:317) at org.eclipse.swt.widgets.Composite.layout(Composite.java:322) at org.eclipse.jface.dialogs.ProgressIndicator.done(ProgressIndicator.java:84) at org.eclipse.jface.action.StatusLine.done(StatusLine.java:290) at org.eclipse.jface.operation.AccumulatingProgressMonitor$2.run(AccumulatingProgressMonitor.java:129) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:102) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2164) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1881) at org.eclipse.swt.widgets.Display.release(Display.java:1928) at org.eclipse.swt.graphics.Device.dispose(Device.java:212) at org.eclipse.ui.internal.Workbench.run(Workbench.java:2029) at org.eclipse.pde.internal.junit.runtime.UITestApplication.run(UITestApplication.java:43) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:295) at org.eclipse.core.launcher.Main.run(Main.java:751) at org.eclipse.core.launcher.Main.main(Main.java:587)
bundles/org.eclipse.jface/src/org/eclipse/jface/action/StatusLine.java
* not set to be visible ad of width 0, they still
				 * draw over the first pixel of the editor 
				 * contributions.
				 * 
				 * The fix here is to draw the progress bar and
				 * cancel button off screen if they are not visible.
				 */
				if (w == fProgressBarComposite && !fProgressIsVisible ||
					w == fToolBar && !fCancelButtonIsVisible) {
					w.setBounds(x + rect.width, y, ws[i], h);
					continue;
				}
				w.setBounds(x, y, ws[i], h);
				if (ws[i] > 0) x+= ws[i] + GAP;
			}
		}
	}
	
	
	/**
	 * Create a new StatusLine as a child of the given parent.
	 */
	public StatusLine(Composite parent) {
		super(parent, SWT.NONE);
		
		addDisposeListener(new DisposeListener() {
			public void widgetDisposed(DisposeEvent e) {
				handleDispose();
			}
		});