Bug 127438 junit view: fast view icon shows "completed" state when view is shown
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/TestRunnerViewPart.java
private static boolean getShowOnErrorOnly() {
		IPreferenceStore store= JUnitPlugin.getDefault().getPreferenceStore();
		return store.getBoolean(JUnitPreferencesConstants.SHOW_ON_ERROR_ONLY);
	}
	public FailureTrace getFailureTrace() {
		return fFailureTrace;
	}
	
	
	public void setShowFailuresOnly(boolean failuresOnly) {
		int layoutMode= failuresOnly ? fLayoutFailures : fLayoutAll;
		setLayoutMode(layoutMode);
	}
	
	private void setLayoutMode(int mode) {
		fLayoutFlatAction.setChecked(mode == LAYOUT_FLAT);
		fLayoutHierarchicalAction.setChecked(mode == LAYOUT_HIERARCHICAL);
		boolean failuresOnly= fFailuresOnlyFilterAction.isChecked();
		if (failuresOnly) {
			fLayoutFailures= mode;
		} else {
			fLayoutAll= mode;
		}
		fTestViewer.setShowFailuresOnly(failuresOnly, mode);
	}
	TestCaseElement[] getAllFailures() {
		return fTestRunSession.getAllFailedTestCaseElements();
	}
}