Bug 45531 [JUnit] Open failed test failed when test name is "1.3 - test346"
Using org.eclipse.jdt.junit version 20031021, I got a failure when I tried to open a failed test that is named "1.3 - test346". This can happen with the compiler tests when they run in 1.3 mode. We add "1.3", "1.4" or "1.5" to distinguish the different compiler compliance mode. I attach a patch for the opening action that fixes the issue.
org.eclipse.jdt.junit/src/org/eclipse/jdt/internal/junit/ui/OpenEditorAtLineAction.java
}
		}
	}
	
	protected IJavaElement findElement(IJavaProject project, String className) throws JavaModelException {
		IJavaElement element= project.findType(className);
		
		
		if (element == null) {
			ISearchPattern pattern=	SearchEngine.createSearchPattern(className, IJavaSearchConstants.TYPE, IJavaSearchConstants.DECLARATIONS, true);
			IJavaSearchScope scope= SearchEngine.createJavaSearchScope(new IJavaElement[] { project }, false);
			NonPublicClassInCUCollector collector= new NonPublicClassInCUCollector();
			SearchEngine searchEngine= new SearchEngine();
			searchEngine.search(JavaPlugin.getWorkspace(), pattern, scope, collector);
			
			element= collector.fFound;
		}
		
		return element;
	}
	public boolean isEnabled() {
		try {
			return getLaunchedProject().findType(getClassName()) != null;
		} catch (JavaModelException e) {
		}
		return false;
	}
}