Bug 168657 - [assist] Content assist displays arg0, arg1, arg2, .. instead of real argument names
Summary: [assist] Content assist displays arg0, arg1, arg2, .. instead of real argumen...
Status: VERIFIED DUPLICATE of bug 102473
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: All All
: P3 major with 2 votes (vote)
Target Milestone: 3.3 M6   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-20 05:47 EST by Ivan Sraka CLA
Modified: 2009-04-28 06:35 EDT (History)
1 user (show)

See Also:


Attachments
Sceen shot of Eclipse "Auto Complete" feature (13.76 KB, image/png)
2006-12-20 05:57 EST, Ivan Sraka CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Sraka CLA 2006-12-20 05:47:02 EST
Content assist displays arg0, arg1, arg2, .. instead of real argument names.

This doest not happen when we have a JAR with SRC attached.
But anyway argument names should be read from byte code (JAR) and SRC must not be required for this.

This bug was found on versions 3.3, 3.2 and 3.2.1.
Comment 1 Ivan Sraka CLA 2006-12-20 05:57:09 EST
Created attachment 55953 [details]
Sceen shot of Eclipse "Auto Complete" feature

Sceen shot of Eclipse "Auto Complete" feature
-Eclipse JDK = JDK1.5.0_07
-Spring JAR was added to the project, but without SOURCE
-no real argument names (just arg0, arg1, ...)
Comment 2 Alex Blewitt CLA 2006-12-20 08:23:18 EST
This bug should be closed invalid.

If the Spring Jar doesn't contain source and/or javadoc attachment, the auto-complete functionality will just guess the names arg0..argN.

The .class files do not contain argument names; they contain argument positions. It is not possible to calculate names for them in this case. However, I believe that there's an option (guess argument names?) when there's no source attached that just uses a guess on the class name.
Comment 3 Ivan Sraka CLA 2006-12-20 08:59:34 EST
> The .class files do not contain argument names; they contain argument
> positions. It is not possible to calculate names for them in this case.
> However, I believe that there's an option (guess argument names?) when there's
> no source attached that just uses a guess on the class name.

Hey man, are you kidding???
From what time .CLASS does NOT contain method names?
Have you ever tried decompiling .CLASS files using JAD for example? 
Have you ever used more intellectual IDE that know parameter names from somewhere (do you think those IDE are guessing?).
Have you ever read JVM Class file specification - http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html?
Have you ever just looked inside of .CLASS file?
If you still does not believe than what is the role of "configLocation" from the following fragment:
"
this DLorg/springframework/context/support/ClassPathXmlApplicationContext; configLocation Ljava/lang/String;
"

Respect,
Comment 4 Ivan Sraka CLA 2006-12-20 10:57:23 EST
who know.. probably you are right.
Looks like I was wrong. Sorry, man.

Anyway, could it be retrieved from javadoc annotations "/**@"?
Comment 5 Ivan Sraka CLA 2006-12-20 11:08:30 EST
Інвалід баг
Comment 6 Ivan Sraka CLA 2006-12-20 11:09:09 EST
Клоузед
Comment 7 Ivan Sraka CLA 2006-12-20 11:21:05 EST
Hm, but there is one more issue:
when compiling with "javac -g" we'd have constructor parameter names embedded in .CLASS.
Why Eclipse is not retrieving at least constructor argument names? 
Comment 8 David Audel CLA 2009-04-17 05:59:04 EDT

*** This bug has been marked as a duplicate of bug 102473 ***
Comment 9 Srikanth Sankaran CLA 2009-04-28 06:35:18 EDT
Verified for 3.5M7 using I20090426-2000