Similar to How to change "Generate Method Stub" to throw NotImplementedException in VS?, but for Eclipse instead of Visual Studio
Both NetBeans and Eclipse have a function that, if you declare a Java class to implement an interface but omit one or more methods, will automatically generate a stub method for you.
The difference is that the Eclipse version will do nothing, and return zero or null, e.g.
public String munge(String foo) {
// TODO Auto-generated method stub
return null;
}
The NetBeans version will throw an exception instead:
public String munge(String foo) {
throw new UnsupportedOperationException("Not supported yet.");
}
which I prefer.
Is it possible to configure Eclipse to do this?