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/HierarchyRunView.java
public String getTestName() {
		TestRunInfo testInfo= getTestInfo();
		if (testInfo == null) 
			return null;
		return testInfo.fTestName;
	}
	
	private String extractClassName(String testNameString) {
		if (testNameString == null) 
			return null;
		int index= testNameString.indexOf('(');
		if (index < 0) 
			return testNameString;
		testNameString= testNameString.substring(index + 1);
		return testNameString.substring(0, testNameString.indexOf(')'));
	}		
	public String getName() {
		return JUnitMessages.getString("HierarchyRunView.tab.title"); 
	}
	
	public void setSelectedTest(String testName) {
		TreeItem treeItem= findFirstItem(testName);
		if (treeItem != null)
			fTree.setSelection(new TreeItem[]{treeItem});
	}
	
	public void endTest(String testName) {	
		TreeItem treeItem= findFirstNotRunItem(testName);
		
		if (treeItem == null)