diff options
author | Doug Schaefer | 2003-11-24 18:31:03 +0000 |
---|---|---|
committer | Doug Schaefer | 2003-11-24 18:31:03 +0000 |
commit | 9dc3aa63e5fac1f55b1ccb189c5dba8afd039a44 (patch) | |
tree | 4cbc420a2fcd22ba347bd1cd50b780071ae50c79 /core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/testplugin | |
parent | 7750af19fa4ae3ae0ee47b6200c01581ca0cefe6 (diff) | |
download | org.eclipse.cdt-9dc3aa63e5fac1f55b1ccb189c5dba8afd039a44.tar.gz org.eclipse.cdt-9dc3aa63e5fac1f55b1ccb189c5dba8afd039a44.tar.xz org.eclipse.cdt-9dc3aa63e5fac1f55b1ccb189c5dba8afd039a44.zip |
Upgrade to Eclipse 3.0. Includes:
- upgrade plugin.xml files
- use PDE containers
- apply Eclipse 3.0 porting items, in particular openEditor and gotoMarker
- remove TestWorkbenches from test plugins
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/testplugin')
-rw-r--r-- | core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/testplugin/TestWorkbench.java | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/testplugin/TestWorkbench.java b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/testplugin/TestWorkbench.java deleted file mode 100644 index 0222d528e3d..00000000000 --- a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/testplugin/TestWorkbench.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * (c) Copyright IBM Corp. 2000, 2001. - * All Rights Reserved. - */ -package org.eclipse.cdt.testplugin; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import junit.framework.Test; -import junit.framework.TestSuite; -import junit.textui.TestRunner; - -import org.eclipse.core.runtime.IPath; - -import org.eclipse.swt.widgets.Display; - -import org.eclipse.ui.internal.Workbench; - -public class TestWorkbench extends Workbench { - - /** - * Run an event loop for the workbench. - */ - protected void runEventLoop() { - // Dispatch all events. - Display display = Display.getCurrent(); - while (true) { - try { - if (!display.readAndDispatch()) - break; - } catch (Throwable e) { - break; - } - } - IPath location= CTestPlugin.getWorkspace().getRoot().getLocation(); - System.out.println("Workspace-location: " + location.toString()); - - - try { - String[] args= getCommandLineArgs(); - if (args.length > 0) { - Test test= getTest(args[0]); - TestRunner.run(test); - } else { - System.out.println("TestWorkbench: Argument must be class name"); - } - } catch (Exception e) { - e.printStackTrace(); - } - - - // Close the workbench. - close(); - } - - public Test getTest(String className) throws Exception { - Class testClass= getClass().getClassLoader().loadClass(className); - - Method suiteMethod= null; - try { - suiteMethod= testClass.getMethod(TestRunner.SUITE_METHODNAME, new Class[0]); - } catch (Exception e) { - // try to extract a test suite automatically - return new TestSuite(testClass); - } - try { - return (Test) suiteMethod.invoke(null, new Class[0]); // static method - } catch (InvocationTargetException e) { - System.out.println("Failed to invoke suite():" + e.getTargetException().toString()); - } catch (IllegalAccessException e) { - System.out.println("Failed to invoke suite():" + e.toString()); - } - return null; - - } - - -}
\ No newline at end of file |