Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » generated method parameters
generated method parameters [message #198040] Wed, 09 March 2005 07:54 Go to next message
Zohar Amir is currently offline Zohar AmirFriend
Messages: 419
Registered: July 2009
Senior Member
When I ask eclipse to add to a class an implementation of one of its
interfaces' methods (e.g., servlet's doPost), it generates the required
methods, but assigns "generic" names to the methods' parameters (e.g., arg0,
arg1, etc.). Why is that? How can I make it use the names defined in the
javadoc? if the javadoc cannot be accessed, is it possible for eclipse to
assign meaningful names (same way it suggests them when hitting ctrl+space
after a type)?
Re: generated method parameters [message #198078 is a reply to message #198040] Wed, 09 March 2005 15:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

zohar wrote:
> When I ask eclipse to add to a class an implementation of one of its
> interfaces' methods (e.g., servlet's doPost), it generates the required
> methods, but assigns "generic" names to the methods' parameters (e.g., arg0,
> arg1, etc.). Why is that? How can I make it use the names defined in the
> javadoc? if the javadoc cannot be accessed, is it possible for eclipse to
> assign meaningful names (same way it suggests them when hitting ctrl+space
> after a type)?

You're only talking about implementing interfaces/methods from an
external library,right? Not implementing an interface/method from your
own code base?
I suspect that Eclipse determines what to use for parameter names based
on the source attached to the library, not the JavaDoc attachment. If
I'm right, it is directly related to
https://bugs.eclipse.org/bugs/show_bug.cgi?id=41421

If you attach source to the library JAR that you're using, it should
work as you expect. You can do that either by right-clicking the JAR in
your workspace (if it is located in your workspace) and choosing
Properties, or by going to your Project properties and editing the JAR
listed in the Java Build Path | Libraries dialog.

HTH,
Eric
Re: generated method parameters [message #198189 is a reply to message #198078] Thu, 10 March 2005 06:46 Go to previous message
Zohar Amir is currently offline Zohar AmirFriend
Messages: 419
Registered: July 2009
Senior Member
Thanks, I added my 2 cents' comment and my vote (for whatever that's
worth...)

"Eric Rizzo" <eclipse@rizzoweb.com> wrote in message
news:d0n387$rh2$1@www.eclipse.org...
> zohar wrote:
>> When I ask eclipse to add to a class an implementation of one of its
>> interfaces' methods (e.g., servlet's doPost), it generates the required
>> methods, but assigns "generic" names to the methods' parameters (e.g.,
>> arg0, arg1, etc.). Why is that? How can I make it use the names defined
>> in the javadoc? if the javadoc cannot be accessed, is it possible for
>> eclipse to assign meaningful names (same way it suggests them when
>> hitting ctrl+space after a type)?
>
> You're only talking about implementing interfaces/methods from an external
> library,right? Not implementing an interface/method from your own code
> base?
> I suspect that Eclipse determines what to use for parameter names based on
> the source attached to the library, not the JavaDoc attachment. If I'm
> right, it is directly related to
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=41421
>
> If you attach source to the library JAR that you're using, it should work
> as you expect. You can do that either by right-clicking the JAR in your
> workspace (if it is located in your workspace) and choosing Properties, or
> by going to your Project properties and editing the JAR listed in the Java
> Build Path | Libraries dialog.
>
> HTH,
> Eric
Previous Topic:Building Annotation Processing Tool plug-in with JDT
Next Topic:problem clicking in editor gutter
Goto Forum:
  


Current Time: Sat Nov 09 03:12:57 GMT 2024

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

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

Back to the top