StackTraceElement[] elements=  new Throwable().getStackTrace(); for (int i= 0; i < elements.length; i++) { StackTraceElement element= elements[i]; if (element.getClassName().equals("org.eclipse.test.EclipseTestRunner")) { PlatformUI.getWorkbench().close(); break; } }
	protected void tearDown() throws Exception {		// do nothing, the set up workspace will be used by the open editor tests				/* 		 * ensure the workbench state gets saved when running with the Automated Testing Framework                 * TODO: remove when https://bugs.eclipse.org/bugs/show_bug.cgi?id=71362 is fixed                 */		StackTraceElement[] elements=  new Throwable().getStackTrace();		for (int i= 0; i < elements.length; i++) {			StackTraceElement element= elements[i];			if (element.getClassName().equals("org.eclipse.test.EclipseTestRunner")) {				PlatformUI.getWorkbench().close();				break;			}		}	}