Re: Getters without the "get" part
Re: Getters without the "get" part
- Subject: Re: Getters without the "get" part
- From: David Avendasora <email@hidden>
- Date: Tue, 31 Mar 2009 05:02:55 -0400
The odd thing is that there is a way for you to define what the
getters and setters will be named each time, but not through "Source -
> Generate Getters and Setters..."
If you first create a field but don't use it anywhere yet, like so:
private String test;
Eclipse will underline it with yellow warning you that you've created
a field that hasn't ever been used. If you hover over it with your
mouse, you'll get the "Quick Fix" menu. On the menu will be "Create
getter and setter for 'test'". When you click on that, then you will
get a dialog box that allows you to adjust the names of the getter and
setter.
It's a pain to do one at a time, but it works.
Is this what you were referring to as "other places in Eclipse that
allow for no get"?
Dave
On Mar 31, 2009, at 12:43 AM, Chuck Hill wrote:
On Mar 30, 2009, at 9:27 PM, Sanford Selznick wrote:
Hello,
Eclipse offers "Generate Getters and Setters" from its "Source" menu.
Is there any way to have this feature add getters without the "get"
prefix? I don't see any way to change this in the Java->Code Style-
>Code Templates preferences.
There are other places in Eclipse that allow for no "get", but not
this menu item specifically.
Any ideas?
No. This is more or less hardwired into Eclipse. I hate it, but I
live with it.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden