Skip to content

Add settings for the TODO comment in generated method/catch stubs#4463

Merged
datho7561 merged 1 commit into
redhat-developer:mainfrom
MeherSru:fix-2963-method-body-template
Jul 14, 2026
Merged

Add settings for the TODO comment in generated method/catch stubs#4463
datho7561 merged 1 commit into
redhat-developer:mainfrom
MeherSru:fix-2963-method-body-template

Conversation

@MeherSru

Copy link
Copy Markdown
Contributor

Fixes #2963.

Adds java.templates.methodBody, java.templates.methodBodySuper, and java.templates.catchBody so people can customize or remove the
"// TODO Auto-generated ..." comment jdt.ls inserts into generated
method stubs and catch blocks. Server-side change is here:
eclipse-jdtls/eclipse.jdt.ls#3847

Defaults are set to match what's generated today (comment included), so this shouldn't change anything for anyone who doesn't touch the setting. Added the new settings to the README and the
predefined-variables doc too.

Tested end to end and went through all three actions
with and without the settings set.

@MeherSru
MeherSru marked this pull request as ready for review July 14, 2026 17:51

@datho7561 datho7561 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks, Meher!

@datho7561
datho7561 merged commit ffbcf2d into redhat-developer:main Jul 14, 2026
2 checks passed
@datho7561

Copy link
Copy Markdown
Contributor

I updated the wiki page to reflect the changes in the template variables markdown file

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants