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

fix json classname fillin to use spec defined var #500

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

ajm01
Copy link
Contributor

@ajm01 ajm01 commented Oct 23, 2023

No description provided.

@ajm01
Copy link
Contributor Author

ajm01 commented Oct 23, 2023

fixes: #499

@turkeylurkey turkeylurkey self-requested a review October 25, 2023 17:59
Copy link
Contributor

@turkeylurkey turkeylurkey left a comment

Choose a reason for hiding this comment

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

Can you explain the design decision to cancel the old method of specifying parameters ($1, $2, $3 etc) and institute this new method instead? I suspect the change in the way we process these json files is a bug. Has LSP4MP changed from ${1} to ${TM_XXX}?

@ajm01
Copy link
Contributor Author

ajm01 commented Oct 25, 2023

Can you explain the design decision to cancel the old method of specifying parameters ($1, $2, $3 etc) and institute this new method instead? I suspect the change in the way we process these json files is a bug. Has LSP4MP changed from ${1} to ${TM_XXX}?

Yes LSP4MP now uses ${TM_XXX} - which is are LSP spec defined fill in vars that LSP4E is implemented to fill in for us - in this PRs case, with the base name of the java part for classname. The LSP4MP (and now LSP4jakarta) codebase understands that this specific var is to be passed back as is in the snippet to LSP4E which will fill it in with the base file name of the part being edited for classname. The other $1, $2 etc vars will be filled in by the Language Server code as it is done in the 0.1.x level of code.

In the 0.1.x codebase of lsp4jakarta, we retrieved the classname along with the packagename as part of the 'jakarta/java/classpath' message flow when getting classpath filtering for the snippets. we no longer are supporting that flow in the new codebase so this is how we make a provision for the base file name to be used for the classname - but now in the LSP4E layer.

@turkeylurkey
Copy link
Contributor

Ok, I see what you mean, LSP4MP does this too.

@turkeylurkey turkeylurkey merged commit 26a36ff into eclipse:main Oct 26, 2023
2 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.

2 participants