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

Supply a ToStringBuilder in common location #798

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Breaking API changes:
* See [#768](https://github.com/eclipse-lsp4j/lsp4j/issues/768) for detailed discussion.
* The name field in WorkspaceFolder is no longer optional according to the specification.
* See [#741](https://github.com/eclipse-lsp4j/lsp4j/issues/741) for detailed discussion.
* The LSP4J generator when applied to `@JsonRpcData` annotated classes generates a dependency on package `org.eclipse.lsp4j.jsonrpc.util` in the `org.eclipse.lsp4j.jsonrpc` bundle to provide an implementation of `ToStringBuilder`.
* This removes the implied requirement in LSP4J 0.21.0 that there is a class called `ToStringBuilder` in a sub-package called `util`.
* This also removes the duplicated class `ToStringBuilder` in packages `org.eclipse.lsp4j.debug.util` and `org.eclipse.lsp4j.util`.
* See [#742](https://github.com/eclipse-lsp4j/lsp4j/issues/742) for detailed discussion.

Nightly japicmp report: <https://download.eclipse.org/lsp4j/builds/main/japicmp-report/>

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,7 @@ class JsonRpcDataProcessor extends AbstractClassProcessor {
returnType = string
addAnnotation(newAnnotationReference(Override))
val accessorsUtil = new AccessorsProcessor.Util(context)
val fqn = impl.qualifiedName
val char dot = '.'
val pkg = fqn.substring(0, fqn.lastIndexOf(dot))
val toStringBuilderClassName = (pkg+".util.ToStringBuilder")
val toStringBuilderClassName = ("org.eclipse.lsp4j.jsonrpc.util.ToStringBuilder")
body = '''
«toStringBuilderClassName.newTypeReference()» b = new «toStringBuilderClassName.newTypeReference()»(this);
«FOR field : toStringFields»
Expand Down