Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse suggest meaningless parameter name
Eclipse suggest meaningless parameter name [message #727221] Tue, 20 September 2011 16:29 Go to next message
java_fan  is currently offline java_fan Friend
Messages: 11
Registered: September 2011
Junior Member
Hello,

My Eclipse is showing code completion for method parameters with meaningless names, for example:

aString.substring(int arg0, int arg1)

How can I make it show meaningful names, e.g substring(int beginIndex, int endIndex) ?

java collection

[Updated on: Sun, 04 December 2011 23:23]

Report message to a moderator

Re: Eclipse suggest meaningless parameter name [message #727238 is a reply to message #727221] Tue, 20 September 2011 16:34 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 20.09.2011 18:29, java_fan wrote:
> Hello,
>
> My Eclipse is showing code completion for method parameters with
> meaningless names, for example:
>
> aString.substring(int arg0, int arg1)
>
> How can I make it show meaningful names, e.g substring(int beginIndex,
> int endIndex) ?
Use a Java SDK which has the source compared to a JRE. Another solution
is to have the Javadoc installed locally. Eclipse can also fetch it from
the web but this can timeout for slow connections in which case you get
arg0, arg1, etc..

Dani
>
> Thanks.
Re: Eclipse suggest meaningless parameter name [message #727239 is a reply to message #727221] Tue, 20 September 2011 16:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Rich Kulp

Is this happening on everything, or just on code that is coming from
Java, such as String.

If it is on stuff from Java then I assume you do not have the Java
source attached. It get's the names for arguments out of the source or
java doc and if it can't find them then it can only do arg0, arg1, etc.

--
Thanks,
Rich Kulp
Re: Eclipse suggest meaningless parameter name [message #727370 is a reply to message #727239] Wed, 21 September 2011 05:40 Go to previous messageGo to next message
Satyam Kandula is currently offline Satyam KandulaFriend
Messages: 444
Registered: July 2009
Senior Member
You could also change the preference to use the best guessed names too -
Windows->Preferences->Java->Editor->Conent Assist, select 'Insert best guessed names'.
Re: Eclipse suggest meaningless parameter name [message #727615 is a reply to message #727370] Wed, 21 September 2011 16:25 Go to previous message
java_fan  is currently offline java_fan Friend
Messages: 11
Registered: September 2011
Junior Member
Thanks guys, I change the preferences and it works!

java collection

[Updated on: Sun, 04 December 2011 23:23]

Report message to a moderator

Previous Topic:show null array entries not working in 4.1
Next Topic:Java compiler suddenly very slow.
Goto Forum:
  


Current Time: Thu Apr 25 13:47:26 GMT 2024

Powered by FUDForum. Page generated in 0.03986 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top