Skip to content

Setting to modify/remove TODO Auto-generated method stub comments #2963

Description

@SethFalco

When we click Add unimplemented methods, it includes a comment: // TODO Auto-generated method stub.

It's a small thing, but it's getting a little annoying to remove that comment in every instance, especially with large interfaces. ^-^'

There's already the throw new UnsupportedOperationException so I can decide for myself from there if it needs to be implemented or not, but including the comment just adds an unnecessary step when writing new implementations.

Could an option please be introduced to override/remove the comment?

Example:

public class Test implements Map {

    @Override
    public int size() {
        // TODO Auto-generated method stub
        throw new UnsupportedOperationException("Unimplemented method 'size'");
    }

    @Override
    public boolean isEmpty() {
        // TODO Auto-generated method stub
        throw new UnsupportedOperationException("Unimplemented method 'isEmpty'");
    }

    // …
} 
Environment
  • Operating System: Debian 11
  • JDK version: 11
  • Visual Studio Code version: 1.75.1
  • Java extension version: 1.15.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions