Bug 100093 - [5.0] method outline/editor sync is broken with some methods with generic signatures
Summary: [5.0] method outline/editor sync is broken with some methods with generic sig...
Status: VERIFIED DUPLICATE of bug 129317
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-14 17:45 EDT by Andrey Loskutov CLA
Modified: 2006-08-07 05:45 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2005-06-14 17:45:06 EDT
With RC2, I couldn't navigate in the ava.awt.Font class code from JDK 1.5 in 
some cases:

public Font(Map<? extends Attribute, ?> attributes)
public static Font getFont(Map<? extends Attribute, ?> attributes) 
public Font deriveFont(Map<? extends Attribute, ?> attributes)

Both method outline view->editor and editor->method outline synchronization 
doesn't work.
Comment 1 Tom Hofmann CLA 2005-06-15 03:35:15 EDT
Hm, we get an invalid source range from ISourceReference.getSourceRange().
Debugging reveals that SourceMapper.getUnqualifiedMethodHandle does not handle
the type parameter properly. Using Signature.getSimpleName on a signature may
not be well defined?
Comment 2 Jerome Lanneluc CLA 2005-06-16 06:47:46 EDT
Tom I failed to see the relationship between the source range and the signature.
Also are you saying that you use pass in a signature to getSimpleName(...) ?
This method accepts type names only. It sounds like you want to use
getSignatureSimpleName(...) instead.
Comment 3 Tom Hofmann CLA 2005-06-16 06:58:19 EDT
(In reply to comment #2)
> Tom I failed to see the relationship between the source range and the signature.

Sorry for not being clear. When I tried to debug the cause for the problem, I
found that SourceMapper.getUnqualifiedMethodHandle in jdt-core uses
getSimpleName on a signature, which looked like a hack to me.

But I probably should not be making assumptions about internal code... :-)

The official bug is that ISourceReference.getSourceRange does not work properly
for the methods mentioned in comment 0.
Comment 4 Jerome Lanneluc CLA 2005-06-16 07:12:41 EDT
Thanks Tom. Indeed the SourceMapper.getUnqualifiedMethodHandle(...) looks
suspicious.
Comment 5 Jerome Lanneluc CLA 2006-07-18 08:51:38 EDT
SourceMapper.getUnqualifiedMethodHandle(...) was rewritten as part of bug 129317.

*** This bug has been marked as a duplicate of 129317 ***
Comment 6 Frederic Fusier CLA 2006-08-07 05:45:28 EDT
Verified for 3.3 M1 using build I20060807-0010