In Eclipse 3.5, under Windows -> Preferences -> Java > Editor -> Templates, I can add code templates. However, these templates can only contain snippets which I can insert i
What you could do is add a normal code short cut (java --> editor --> templates),
i.e. make an editor template "newcustomclass" be the contents of the class you're talking about.
Then create the new java class in the normal way, delete all the content and then use the "newcustomclass" code template to create the new auto java class.
Here's an example for a simple exception class:
public class ${enclosing_type} extends Exception {
/**
* Constructs with the given throwable
* @param t the throwable to throw
*/
public ${enclosing_type}(Throwable t) {
super(t);
}
/**
* Constructs with the given message
* @param message the message of the exception
*/
public ${enclosing_type}(String message) {
super(message);
}
/**
* Constructs with the given message and the original throwable cause
* @param message the message of the exception
* @param t the original throwable
*/
public ${enclosing_type}(String message, Throwable t) {
super(message, t);
}
}