In Eclipse (Java), how do I automatically add code to every class I create. Suppose I create a class called Foo, I want this code to automatically go in the preamble/state:
private final Logger log = LoggerFactory.getLogger(this.getClass());
and the appropriate slf4j import to be automatically imported. Similarly, I would like the constructor to automatically show up. Full example of what I would like to see after I click the create button:
package test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Foo {
    private final Logger log = LoggerFactory.getLogger(this.getClass());
    public Foo() {
    }
}
 
    
 
     
 