RSS Feed for This PostCurrent Article

Make Use of Eclipse Code Template

By defining your own Eclipse code template, you can greatly simplify your daily programming work

E.g. go to Windows->Preferences->Java->Editor->Templates, and add a template called “log” with the following pattern

private static final Log log =  
    LogFactory.getLog( ${enclosing_type}.class );  

Then in our editor, just type “log” and then press “Ctrl-Space”, then statement will be generated automatically.

private static final Log log = LogFactory.getLog(MyClass.class);

Trackback URL

Sorry, comments for this entry are closed at this time.