• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getters without the "get" part
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Getters without the "get" part
      • From: Sanford Selznick <email@hidden>
References: 
 >Getters without the "get" part (From: Sanford Selznick <email@hidden>)
 >Re: Getters without the "get" part (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: OT: Thumbnail image of webpage
  • Next by Date: Re: How does concurrency control work in WO?
  • Previous by thread: Re: Getters without the "get" part
  • Next by thread: Re: Getters without the "get" part
  • Index(es):
    • Date
    • Thread