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

Add methods,inherited fields,inherited methods to Generate toString() #3055

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

snjeza
Copy link
Contributor

@snjeza snjeza commented Feb 13, 2024

@snjeza
Copy link
Contributor Author

snjeza commented Feb 28, 2024

@rgrunber I have updated the PR.

Copy link
Contributor

@rgrunber rgrunber left a comment

Choose a reason for hiding this comment

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

Overall, I think the code is good to merge. Just one thing I noticed.

Can this be done in this PR or is there more involved ?

@snjeza
Copy link
Contributor Author

snjeza commented Feb 28, 2024

@rgrunber I have updated the PR.

Copy link
Contributor

@rgrunber rgrunber left a comment

Choose a reason for hiding this comment

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

Note that this still doesn't fix the issue for records. It'll generate a toString as before, with no dialog to allow the user to select members to be included. If you look at

, you'll see nonStaticFields is false and isInTypeDeclaration is also false. The result is just a source action being generated with an empty ( LSPVariableBinding[0] ) selection.

However, I noticed that hasFields is also called for constructor generation, so I'm fine with addressing this in some other PR since it seems to drag in that logic also.

@rgrunber rgrunber merged commit 27a1a1e into eclipse-jdtls:master Feb 28, 2024
7 checks passed
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.

Generate toString() source action should support inclusion of methods
2 participants