Bug 264014 [CommonNavigator] Test failures on osx/carbon/ppc N20090205-2000
testHideAvailableExtensions Success 9.595 testEmptyWindowWorkingSet Success 0.295 testMissingProjectsInWorkingSet Success 1.053 testTopLevelWorkingSet Success 0.223 testTopLevelChange Success 0.280 testMultipleWorkingSets Success 0.222 testCategoryWizard Success 0.430 testNavigatorRootContents Success 0.277 testNavigatorExtensionEnablement Error Graphic is disposed org.eclipse.swt.SWTException: Graphic is disposed at org.eclipse.swt.SWT.error(SWT.java:3860) at org.eclipse.swt.SWT.error(SWT.java:3775) at org.eclipse.swt.SWT.error(SWT.java:3746) at org.eclipse.swt.graphics.Image.getBounds(Image.java:607) at org.eclipse.swt.widgets.TreeItem.calculateWidth(TreeItem.java:230) at org.eclipse.swt.widgets.Tree.setScrollWidth(Tree.java:3275) at org.eclipse.swt.widgets.TreeItem.setText(TreeItem.java:1422) at org.eclipse.swt.widgets.TreeItem.setText(TreeItem.java:1431) at org.eclipse.ui.tests.navigator.NavigatorTestBase.refreshViewer(NavigatorTestBase.java:151) at org.eclipse.ui.tests.navigator.OpenTest.testNavigatorExtensionEnablement(OpenTest.java:55) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:354) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:206) at org.eclipse.test.UITestApplication$3.run(UITestApplication.java:195) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3340) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3069) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2388) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2352) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2204) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:333) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:138) at org.eclipse.test.UITestApplication.run(UITestApplication.java:60) at org.eclipse.test.UITestApplication.start(UITestApplication.java:210) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:32) 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:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511) at org.eclipse.equinox.launcher.Main.run(Main.java:1284) at org.eclipse.equinox.launcher.Main.main(Main.java:1260) at org.eclipse.core.launcher.Main.main(Main.java:30) 0.196 testFindValidExtensions Success 0.199 testDeactivateTestExtension Success 0.353 testBindTestExtension Success 0.058 testTestExtensionVisibility Success 0.023 testResourceExtensionVisibility Success 0.032 testVisibleExtensionIds Success 0.036 testNavigatorRootContents Success 0.268 testNavigatorExtensionEnablement Success 0.199 testNavigatorSorterAccess Success 0.178 testNavigatorRootContents Success 0.338 testSimpleResFirst Success 0.226 testSimpleResLast Success 0.215 testSorterMissing Error Graphic is disposed org.eclipse.swt.SWTException: Graphic is disposed at org.eclipse.swt.SWT.error(SWT.java:3860) at org.eclipse.swt.SWT.error(SWT.java:3775) at org.eclipse.swt.SWT.error(SWT.java:3746) at org.eclipse.swt.graphics.Image.getBounds(Image.java:607) at org.eclipse.swt.widgets.TreeItem.calculateWidth(TreeItem.java:230) at org.eclipse.swt.widgets.Tree.setScrollWidth(Tree.java:3275) at org.eclipse.swt.widgets.TreeItem.setText(TreeItem.java:1422) at org.eclipse.swt.widgets.TreeItem.setText(TreeItem.java:1431) at org.eclipse.ui.tests.navigator.NavigatorTestBase.refreshViewer(NavigatorTestBase.java:151) at org.eclipse.ui.tests.navigator.SorterTest.testSorterMissing(SorterTest.java:38) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:354) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:206) at org.eclipse.test.UITestApplication$3.run(UITestApplication.java:195) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3340) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3069) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2388) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2352) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2204) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:333) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:138) at org.eclipse.test.UITestApplication.run(UITestApplication.java:60) at org.eclipse.test.UITestApplication.start(UITestApplication.java:210) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:32) 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:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511) at org.eclipse.equinox.launcher.Main.run(Main.java:1284) at org.eclipse.equinox.launcher.Main.main(Main.java:1260) at org.eclipse.core.launcher.Main.main(Main.java:30) 0.446 testSorterProperty Error Graphic is disposed org.eclipse.swt.SWTException: Graphic is disposed at org.eclipse.swt.SWT.error(SWT.java:3860) at org.eclipse.swt.SWT.error(SWT.java:3775) at org.eclipse.swt.SWT.error(SWT.java:3746) at org.eclipse.swt.graphics.Image.getBounds(Image.java:607) at org.eclipse.swt.widgets.TreeItem.calculateWidth(TreeItem.java:230) at org.eclipse.swt.widgets.Tree.setScrollWidth(Tree.java:3275) at org.eclipse.swt.widgets.TreeItem.setText(TreeItem.java:1422) at org.eclipse.swt.widgets.TreeItem.setText(TreeItem.java:1431) at org.eclipse.ui.tests.navigator.NavigatorTestBase.refreshViewer(NavigatorTestBase.java:151) at org.eclipse.ui.tests.navigator.SorterTest.testSorterProperty(SorterTest.java:68) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:354) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:206) at org.eclipse.test.UITestApplication$3.run(UITestApplication.java:195) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3340) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3069) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2388) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2352) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2204) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:499) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:333) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:492) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:138) at org.eclipse.test.UITestApplication.run(UITestApplication.java:60) at org.eclipse.test.UITestApplication.start(UITestApplication.java:210) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:32) 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:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:556) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:511) at org.eclipse.equinox.launcher.Main.run(Main.java:1284) at org.eclipse.equinox.launcher.Main.main(Main.java:1260) at org.eclipse.core.launcher.Main.main(Main.java:30) 0.486 testBasicDragDrop Success 3.698 testResourceDrag Success 4.845 testSetDragOperation Success
tests/org.eclipse.ui.tests.navigator/src/org/eclipse/ui/tests/navigator/NavigatorTestBase.java
_contentService = _viewer.getNavigatorContentService();
		_actionService = _commonNavigator.getNavigatorActionService();
		IUndoableOperation updateFilters = new UpdateActiveFiltersOperation(
				_viewer, new String[0], true);
		updateFilters.execute(null, null);
	}
	protected void tearDown() throws Exception {
		clearAll();
		
		EditorTestHelper.showView(_navigatorInstanceId, false);
	}
	protected void clearAll() throws Exception {
		IProject[] projects = ResourcesPlugin.getWorkspace().getRoot()
				.getProjects();
		for (int i = 0; i < projects.length; i++) {
			projects[i].delete(true, null);
		}
	}
	
	
	
	
	protected void refreshViewer() {
		TreeItem[] rootItems = _viewer.getTree().getItems();
		if (rootItems.length > 0)
			rootItems[0].setText("");
		_viewer.refresh();
	}
}