fTestViewer.setActiveSession(fTestRunSession); postSyncRunnable(new Runnable() { public void run() { fTestViewer.processChangesInUI();  if (fTestRunSession == null) { fStopAction.setEnabled(false); fRerunLastTestAction.setEnabled(false); fRerunLastFailedFirstAction.setEnabled(false); fNextAction.setEnabled(false); fPreviousAction.setEnabled(false); } else { fRerunLastTestAction.setEnabled(true); boolean hasErrorsOrFailures= hasErrorsOrFailures(); fRerunLastFailedFirstAction.setEnabled(hasErrorsOrFailures); fNextAction.setEnabled(hasErrorsOrFailures); fPreviousAction.setEnabled(hasErrorsOrFailures);  fCounterPanel.setTotal(fTestRunSession.getTotalCount()); }  refreshCounters(); } });
	private void setActiveTestRunSession(TestRunSession testRunSession) {		fTestRunSession= testRunSession;		if (testRunSession == null) {			setTitleToolTip(null);		} else {			fTestSessionListener= new TestSessionListener();			fTestRunSession.addTestSessionListener(fTestSessionListener);			setTitleToolTip(fTestRunSession.getTestRunName());		}		fTestViewer.setActiveSession(fTestRunSession);		postSyncRunnable(new Runnable() {			public void run() {				fTestViewer.processChangesInUI();								if (fTestRunSession == null) {					fStopAction.setEnabled(false);					fRerunLastTestAction.setEnabled(false);					fRerunLastFailedFirstAction.setEnabled(false);					fNextAction.setEnabled(false);					fPreviousAction.setEnabled(false);				} else {					fRerunLastTestAction.setEnabled(true);					boolean hasErrorsOrFailures= hasErrorsOrFailures();					fRerunLastFailedFirstAction.setEnabled(hasErrorsOrFailures);					fNextAction.setEnabled(hasErrorsOrFailures);					fPreviousAction.setEnabled(hasErrorsOrFailures);										fCounterPanel.setTotal(fTestRunSession.getTotalCount());				}								refreshCounters();			}		});	}