Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Parameters code style options
Parameters code style options [message #516067] Mon, 22 February 2010 11:22 Go to next message
Eclipse UserFriend
Hi everybody!
I was wondering if there is any way to customize the way Eclipse generate parameters name in the code generation.

Here is what I have:
in Java->Code Style -> Fields prefix is m_
in Java->Code Style -> Parameters prefix is p_

In the code if I define a field m_MyField and generate a setter, the generated code is
public void setMyField(type p_myField).

but what I would like to get is
public void setMyField(type p_MyField).


Do you guys know if there is some option I can specify in the Code Style or Code Generation options to get something like that?

Otherwise, would it be possible to do it with a plugin? I tried to have a look at some documentation but I couldn't find anything regarding how to hock a plugin with the code generator in JDT...

Thanks a lot!
Re: Parameters code style options [message #516253 is a reply to message #516067] Tue, 23 February 2010 01:54 Go to previous message
Eclipse UserFriend
Andrea Di Muzio wrote:
> Hi everybody!
> I was wondering if there is any way to customize the way Eclipse
> generate parameters name in the code generation.
>
> Here is what I have:
> in Java->Code Style -> Fields prefix is m_
> in Java->Code Style -> Parameters prefix is p_
>
> In the code if I define a field m_MyField and generate a setter, the
> generated code is
>
> public void setMyField(type p_myField).
>
> but what I would like to get is
>
> public void setMyField(type p_MyField).
>
>
> Do you guys know if there is some option I can specify in the Code
> Style or Code Generation options to get something like that?
>
> Otherwise, would it be possible to do it with a plugin? I tried to
> have a look at some documentation but I couldn't find anything
> regarding how to hock a plugin with the code generator in JDT...
This is currently not possible.

Dani
>
> Thanks a lot!
>
Previous Topic:Java Build Path
Next Topic:Bypass the "Run As" and "Debug As" dialogs?
Goto Forum:
  


Current Time: Sat Jul 05 11:21:24 EDT 2025

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

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

Back to the top