JUtils plugin

This plugin provides utility methods to generate copy constructors and toString() methods.

There is no auto-install URL... just download the zip, and then put the contents in the plugins directory.

When you're done, you'll get a new JUtils menu at the very bottom of the context menu. The format probably won't match what you want (huge Javadoc, for instance). Edit it at Window >> Preferences >> JUtils >> toString()

Here are my templates:

1. Javadoc

/** String representation of this object. */

2. Method body

public String toString() {
    final String tab = "    ";
    
    StringBuffer retValue = new StringBuffer();
    
    retValue.append("${class_name} ( ")
        .append(super.toString()).append(tab)
        .append("${attribute} = ").append(this.${attribute}).append(tab)
        .append(" )");
    
    return retValue.toString();
}

EclipseJUtils (last edited 2010-05-28 19:07:51 by KennethPronovici)