Bug 80778 JUnit view toolbar run button enabled when no test can be run [JUnit]
Version 3.1M3. JUnit view toolbar run button enabled when no test can be run/ -Run a JUnit test from the JUnit View. -Shutdown Eclipse. -Start Eclipse. -The JUnit view toolbar run button is enabled, clicking it does nothing. The button should be disabled when no test can be run. Additionally, the JUnit view could remember the last test run accross shutown/restarts. Gary
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestRunnerViewPart.java
if (!isDisposed())
			getDisplay().asyncExec(r);
	}
	
	boolean isCreated() {
		return fCounterPanel != null;
	}
	public void rerunTest(String testId, String className, String testName, String launchMode) {
		DebugUITools.saveAndBuildBeforeLaunch();
		postRerunTest(testId);
		if (lastLaunchIsKeptAlive())
			fTestRunnerClient.rerunTest(testId, className, testName);
		else if (fLastLaunch != null) {
			
			ILaunchConfiguration launchConfiguration= fLastLaunch.getLaunchConfiguration();
			if (launchConfiguration != null) {
				try {
					String name= className;
					if (testName != null) 
						name+= "."+testName; 
					String configName= Messages.format(JUnitMessages.TestRunnerViewPart_configName, name); 
					ILaunchConfigurationWorkingCopy tmp= launchConfiguration.copy(configName); 
					 
					tmp.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, className);
					
					tmp.setAttribute(JUnitBaseLaunchConfiguration.LAUNCH_CONTAINER_ATTR, ""); 
					if (testName != null) {
						tmp.setAttribute(JUnitBaseLaunchConfiguration.TESTNAME_ATTR, testName);