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
return fErrorCount+fFailureCount > 0;
	}
	private String elapsedTimeAsString(long runTime) {
		return NumberFormat.getInstance().format((double)runTime/1000);
	}
	/*
	 * @see ITestRunListener#testRunStopped
	 */
	public void testRunStopped(final long elapsedTime) {
		String msg= JUnitMessages.TestRunnerViewPart_message_stopped; 
		setInfoMessage(msg);
		handleStopped();
	}
	private void handleStopped() {
		postSyncRunnable(new Runnable() {				
			public void run() {
				if(isDisposed()) 
					return;	
				resetViewIcon();
				fStopAction.setEnabled(false);
				fRerunLastFailedFirstAction.setEnabled(hasErrorsOrFailures());
				fProgressBar.stopped();
			}
		});	
		stopUpdateJobs();
	}
	private void resetViewIcon() {
		fViewImage= fOriginalViewImage;
		firePropertyChange(IWorkbenchPart.PROP_TITLE);
	}