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/src/org/eclipse/jdt/internal/junit/ui/JUnitPreferencePage.java
Object[] types= dialog.getResult();
		if (types != null && types.length > 0) {
			IType type= (IType) types[0];
			fStackFilterContentProvider.addFilter(type.getFullyQualifiedName(), true);
		}
	}
	private void addPackage() {
		Shell shell= getShell();
		ElementListSelectionDialog dialog= null;
		try {
			dialog= JUnitPlugin.createAllPackagesDialog(shell, null, true);
		} catch (JavaModelException jme) {
			String title= JUnitMessages.getString("JUnitPreferencePage.addpackagedialog.title"); 
			String message= JUnitMessages.getString("JUnitPreferencePage.addpackagedialog.error.message"); 
			ExceptionHandler.handle(jme, shell, title, message);
			return;
		}
		dialog.setTitle(JUnitMessages.getString("JUnitPreferencePage.addpackagedialog.title")); 
		dialog.setMessage(JUnitMessages.getString("JUnitPreferencePage.addpackagedialog.message")); 
		dialog.setMultipleSelection(true);
		if (dialog.open() == IDialogConstants.CANCEL_ID)
			return;
		Object[] packages= dialog.getResult();
		if (packages == null)
			return;
		for (int i= 0; i < packages.length; i++) {
			IJavaElement pkg= (IJavaElement) packages[i];
			String filter= pkg.getElementName();
			if (filter.length() < 1)
				filter= JUnitMessages.getString("JUnitMainTab.label.defaultpackage");