Community
Participate
Working Groups
Build 20050509-2010 - Open editor on file java.lang.reflect.Constructor.class (with attached sources). - Select 2nd or 3rd occurrence of 'T' on line 573 : public <T extends Annotation> T getAnnotation(Class<T> annotationClass) ^ ^ - Press F3: the editor goes to line 0, where I would have expected the type parameter T to be selected instead (#getAnnotation is a generic method).
SelectionEngine return the correct JavaElement but the source range of this element is false ([offset=0, length=1]). I found some problems: - getSourceRange() does not use the source mapper if the type parameter is inside a binary type or method. - SourceMapper does not compute source range for type parameters
Fixed and released in HEAD. I checked that the steps to reproduce are working fine, but I don't know how to add a regression test.
Changes in org.eclipse.jdt.internal.core.SourceMapper and org.eclipse.jdt.internal.core.TypeParameter.
Verified for 3.1 RC1 with build I20050527-0010.