Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Generate Getters/Setters(Generated Method Names)
Generate Getters/Setters [message #512290] Thu, 04 February 2010 10:09 Go to next message
Eclipse UserFriend
Is there a way to have the generate getters/setters not use the field prefix for the method names.

Example:

private String m_strField = null;

Generates:

pubilc String getM_strField()
{
}

and

public void setM_strField(String mStrField)
{
}

In the preferences->java->code style, I have my Fields Prefix List set to m_int, m_str, etc... and my Parameters prefix set to a

So I would like the method name to not have the M_str and the set parameter start with an a
Re: Generate Getters/Setters [message #512453 is a reply to message #512290] Fri, 05 February 2010 03:22 Go to previous messageGo to next message
Eclipse UserFriend
Scott Selvia wrote:
> Is there a way to have the generate getters/setters not use the field
> prefix for the method names.
>
> Example:
>
> private String m_strField = null;
>
> Generates:
>
> pubilc String getM_strField()
> {
> }
>
> and
>
> public void setM_strField(String mStrField)
> {
> }
>
> In the preferences->java->code style, I have my Fields Prefix List set
> to m_int, m_str, etc... and my Parameters prefix set to a
>
> So I would like the method name to not have the M_str and the set
> parameter start with an a
This works fine for me. Maybe you change the workspace preference but
the project uses project specific settings?

Dani
Re: Generate Getters/Setters [message #512652 is a reply to message #512453] Fri, 05 February 2010 14:18 Go to previous message
Eclipse UserFriend
Thanks, that did the trick.
Previous Topic:classpath priority
Next Topic:unable to see jboss 5.1 in list
Goto Forum:
  


Current Time: Thu Mar 27 01:12:30 EDT 2025

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

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

Back to the top