Project: JDT
Bug 193200 [JUnit] JUnit tabs set mapped resource to null when project closed
Reported: 2007-06-18 17:00:08 | Status: resolved fixed

The JUnit tabs set the mapped resource every time a configuration is selected in the launch dialog, which is fine except for the closed project filter. If the there exists a unit test mapped to a closed project and you turn the closed project filter off and then select the config, it will no longer be filtered. This is because a null resource mapping is passed through ClosedProjectFIlter. It seems that if the mapped resource is not available maybe the tabs should not remove it? Steps: 1. create a project with a unit test in it 2. run as the unit test from editor or package explorer, etc 3. close the project (config is filtered from everywhere) 4. open launch dialog and turn off the closed project filter 5. select the unit test for the closed project (removes mapping) 6. turn the closed project on. Expected: the config goes back to being filtered Happens: the config shows up everywhere again and throws errors when selected/used

Files changed in fix:
org.eclipse.jdt.junit.core/src/org/eclipse/jdt/internal/junit/launcher/JUnitMigrationDelegate.java org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/launcher/JUnitMigrationDelegate.java