Monday, January 26, 2009

Eclipse Singletone template


Pattern should look like:

// *** SIngletone impl
private static class InstanceHolder{
private static ${enclosing_type} instance = new ${enclosing_type}();

private ${enclosing_type}() {}

public static ${enclosing_type} getInstance() {
return InstanceHolder.instance;
// ***

Now every time you need quick singletone implementation you just type single and ctrl+space...

Tuesday, January 13, 2009

I looove eclipse

We are bringing code review in our small team as an experiment. And I like it!
I liked it until I got "... and put brackets around every one statement if/else block..." in review of my code.
Thank you Oisin and thank you Eclipse!

Keep your code clean with Eclipse V3.3