Bug 12871 JUnit view keeps focus even after clicking somewhere else.
Here are the scenarios I tested. Scenario 1 - Bug is revealed 1. Highlight a JUnit test in the packages view. 2. Click the "Run" button. 3. Highlight another test in the packages view. 4. BUG...JUnit still has focus. Scenario 2 - Bug is not present 1. Highlight a JUnit test in the packages view. 2. Click the "Run" button. 3. Click on any other window, besided packages view. 4. JUnit correctly gives up focus. It seems that when JUnit is run, it won't give up the focus to view you just came from. This seems to be a problem for me because I'll run my test, test is successful, then I'll try to run the next test or write some code. Can't do either because JUnit still has focus. Now, if I click on the title bar first, I don't have a problem, but I don't always remember to do that, nor do I want to have to remember...(old age).
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/JUnitPlugin.java
/**
	 * The single instance of this plug-in runtime class.
	 */
	private static JUnitPlugin fgPlugin= null;
	
	public static final String PLUGIN_ID = "org.eclipse.jdt.junit" ; 
	public final static String TEST_SUPERCLASS_NAME= "junit.framework.TestCase"; 
	public final static String TEST_INTERFACE_NAME= "junit.framework.Test"; 
	private static URL fgIconBaseURL;
	
	/**
	 * Use to track new launches. We need to do this
	 * so that we only attach a TestRunner once to a launch.
	 * Once a test runner is connected it is removed from the set.
	 */
	private AbstractSet fTrackedLaunches= new HashSet(20);
	
	public JUnitPlugin(IPluginDescriptor desc) {
		super(desc);
		fgPlugin= this;
		String pathSuffix= "icons/"; 
		try {
			fgIconBaseURL= new URL(getDescriptor().getInstallURL(), pathSuffix);
		} catch (MalformedURLException e) {
			
		}