2008-09-01

Add loggers to your Java code in seconds using Eclipse Templates

Custom Eclipse Templates can greatly increase your productivity by automating daily development. For instance, instead of creating Apache Commons Logging loggers by hand, you can do this:

Setup

Go to Window -> Preferences -> Java -> Editor -> Templates. Create New:



Action

Type "log", hit Content Assist shortcut key (ctrl+space by default), then enter:



Hit Ctrl+Shift+O to import Log and LogFactory:



Saves hell of a time in the long run.

No comments:

Post a Comment

Spam comments (i.e. ones that contain links to web development services) will be reported along with user profiles!

Note: only a member of this blog may post a comment.