Bug 102473

Summary: code assist: parameter names not harvested from debug info in class files
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bmiller, dummy_email, frederic_fusier, philippe_mulet
Version: 3.1   
Target Milestone: 3.3 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Regression tests none

Description Adam Kiezun CLA 2005-07-01 09:10:27 EDT
3.1
get this zip 
http://prdownloads.sourceforge.net/jggapi/jggapi-1.0.1-bin.zip?download

extract the jar file from it and put on build path

open the class file editor for LoginContext. Look at constructor. You see that
both parameter names are known: uin, password

Now, try completing:
new LoginContext(<CODEASSIST>

you get 2 not informative parameter hints: arg0, arg1


I seem to remember this worked before. It's either a code assist problem or a
settings problem. It should work out of the box.
Comment 1 Olivier Thomann CLA 2005-07-01 10:16:58 EDT
Do you have a source attachment to this jar?
Comment 2 Adam Kiezun CLA 2005-07-01 10:21:04 EDT
No source attachment should be needed here for the names of parameters. They are
contained in the debug info. 
I see them when I open the classfile editor.

For reference, the sources are available here:
http://sourceforge.net/project/showfiles.php?group_id=79198
It's version 1.0.1.
Comment 3 Olivier Thomann CLA 2006-10-06 15:57:27 EDT
I'll investigate current behavior.
Comment 4 Olivier Thomann CLA 2007-02-16 11:57:44 EST
We never looked for arguments names inside debug attribute.
I'll see if this can be added without a major hit on performance.
Comment 5 Olivier Thomann CLA 2007-02-16 12:38:47 EST
Created attachment 59172 [details]
Proposed fix
Comment 6 Olivier Thomann CLA 2007-02-16 12:38:58 EST
Created attachment 59173 [details]
Regression tests
Comment 7 Olivier Thomann CLA 2007-02-16 12:40:15 EST
Philippe,

Let me know if you are interested by such a support. It doesn't seem to have an noticeable impact on performances.

Frédéric,

Could you please run the performance tests with this patch?
Thanks.
Comment 8 Olivier Thomann CLA 2007-02-16 12:42:21 EST
Adam,

Note that this implies the library to be compiled with local variable table attribute. By default this attribute is not provided.
However in the library that you refer to, they are included.
Comment 9 Frederic Fusier CLA 2007-03-19 13:44:11 EDT
(In reply to comment #7)
> Frédéric,
> 
> Could you please run the performance tests with this patch?
> Thanks.
> 
Performance tests are OK with this patch...
Comment 10 Olivier Thomann CLA 2007-03-19 13:50:17 EDT
Released for 3.3M6
Comment 11 Olivier Thomann CLA 2007-03-19 13:53:02 EDT
Regression tests added in org.eclipse.jdt.core.tests.compiler.regression.ClassFileReaderTest_1_4#test078/080
Comment 12 David Audel CLA 2007-03-20 09:00:50 EDT
Verified for 3.3 M6 using build I20070320-0010
Comment 13 David Audel CLA 2009-04-17 05:59:04 EDT
*** Bug 168657 has been marked as a duplicate of this bug. ***