Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure line delimiter exists after the file header template. #2906

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

rgrunber
Copy link
Contributor

With java.templates.fileHeader defined. When a type is annotated as SampleClass cannot be resolved to a Type, the Create {class|interface|enum} SampleClass code action produces :

image

This regressed in d8e5236#diff-253491dd873df873b33c21cb35ead8d713dd6ac01d2a5b0d2cf91ce5b3f942b9R122 . I must have tried to make all templates containing ${filecomment}${package_declaration} look the same, and so removed the newline from the "newtype" template, not realizing we manually add a line delimiter for the snippet type declaration templates but not for "newtype"

  • When a file header template is defined there should be a line delimiter between it and the package declaration (or type declaration)

@rgrunber rgrunber added this to the End October 2023 milestone Oct 17, 2023
- When a file header template is defined there should be a line
  delimiter between it and the package declaration (or type declaration)
- Use project configured line delimiter instead of '\n' where possible

Signed-off-by: Roland Grunberg <[email protected]>
@rgrunber rgrunber merged commit 9621530 into eclipse-jdtls:master Oct 17, 2023
6 checks passed
@rgrunber rgrunber deleted the fix-newcu-fileheader branch October 17, 2023 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant