Bug 25324 Ability to know when tests are finished [junit]
Hi, I'm writing a Cactus Plugin that extends the JUnit Plugin and I need to know when the tests have finished running in the TestRunner. There is a nice ITestRunListener interface for that. My idea was thus to implement this interface and somehow register my listener to the TestRunner (RemoteTestRunnerClient). However: 1/ Currently the RemoteTestRunnerClient implementation only supports one listener 2/ There is no API in TestRunnerViewPart to get access to the TestRunner I am attaching a patch that should provide this facility. However, I need your help to know if this is the right approach or not. Thank you -Vincent
org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/JUnitCorePlugin.java
}		
	/**
	 * Utility method to create and return a selection dialog that allows
	 * selection of a specific Java package.  Empty packages are not returned.
	 * If Java Projects are provided, only packages found within those projects
	 * are included.  If no Java projects are provided, all Java projects in the
	 * workspace are considered.
	 */
	public static ElementListSelectionDialog createAllPackagesDialog(Shell shell,	IJavaProject[] originals, final boolean includeDefaultPackage) throws JavaModelException {
		final List packageList= new ArrayList();
		if (originals == null) {
			IWorkspaceRoot wsroot= ResourcesPlugin.getWorkspace().getRoot();
			IJavaModel model= JavaCore.create(wsroot);
			originals= model.getJavaProjects();
		}
		final IJavaProject[] projects= originals;
		final JavaModelException[] exception= new JavaModelException[1];
		ProgressMonitorDialog monitor= new ProgressMonitorDialog(shell);
		IRunnableWithProgress r= new IRunnableWithProgress() {
			public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
				try {
					Set packageNameSet= new HashSet();
					monitor.beginTask(JUnitMessages.getString("JUnitPlugin.searching"), projects.length); 
					for (int i= 0; i < projects.length; i++) {
						IPackageFragment[] pkgs= projects[i].getPackageFragments();
						for (int j= 0; j < pkgs.length; j++) {
							IPackageFragment pkg= pkgs[j];
							if (!pkg.hasChildren() && (pkg.getNonJavaResources().length > 0))
								continue;
							String pkgName= pkg.getElementName();