Sign in

E-mail *, (xx@domain.com)
Password *

Register | Forgot password

Blogs

  • Bram de Kruijff
  • Ivo Ladage
  • Mark van Cuijk
  • Martin van Mierloo
  • Martijn van Berkum
  • Michel Teunissen
  • Patrick Atoon

Recent blogs

RSS - Blogs
March 9, 2010
State of OSGi in the Java world
March 4, 2010
Reach more people with Google Translate
March 3, 2010
Get My Advice
February 26, 2010
What? Where!?!
February 11, 2010
Split it!

All Blogs...


Get My Advice

March 3, 2010

One of the WCB guidelines tells you to use the proper coding conventions and prescribes the use of CheckStyle with a GX-specific configuration file. One of the things this configuration file makes you do is prefix all member fields with the "my" keyword. When you do this in Eclipse and then use the "Generate Getters and Setters" tool, you'll get methods like getMyAdvice() if you're not careful.

To get rid of this behavior, there is only one thing you need to do: open the Window menu and click Preferences. Navigate to Java and then Code Style. In the pane that is now displayed, make sure you've specified the "my" prefix for member fields. After applying this setting, the next time you use the "Generate Getters and Setters" tool, Eclipse will strip the prefix and generate a getAdvice() method for you!

Eclipse Preferences window with the Code Style pane open

About the Author

Return to all blogs


Mark is software engineer with a special interest in Security and Digital WebTV. Mark writes about daily engineering with GX WebManager

Read all Marks blog entries

Other blog entries:

February 11, 2010
Split it!
April 22, 2009
What goes in, must come out!
July 29, 2008
WCB Sharing FTW!
June 17, 2008
Found me on LinkedIn?
April 18, 2008
Tosti
April 7, 2008
Baking apple pie at 347
March 21, 2008
Short story about not inventing another wheel
March 13, 2008
Files in and files out
February 29, 2008
Big Brother is watching


Share:

del.icio.us
digg
Technorati
Slashdot
Reddit
YahooMyWeb
NewsVine
ekudos
© 2010 GX creative online development B.V.

Disclaimer

This website (GXdeveloperweb.com) may discuss or contain opinions, (sample) coding, software or other information that does not include GX official interfaces, instructions or guidelines and therefore is not supported by GX. Changes made based on this information are not supported.  GX will not be held liable for any damages caused by using or misusing the information, software, instructions, code or methods suggested on this website, and anyone using these methods does so at his/her own risk. GX offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this website, including any liability resulting from incompatibility between the content of this website and the materials and services offered by GX. By using this website you will not hold, or seek to hold, GX responsible or liable with respect to the content of this website.