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

Remove xtend.lib dependency #1630

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@

import java.util.List;

import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
import org.eclipse.lsp4j.jsonrpc.util.ToStringBuilder;

Choose a reason for hiding this comment

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

This was not available in lsp4j 0.20.x

Copy link
Member Author

Choose a reason for hiding this comment

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

Hm... do one really needs this helper class here? It really seems not suing all the facy stuff here any maybe a standard java StingBuilder would suffice?

Choose a reason for hiding this comment

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

It can be inlined for sure.


/**
* Specific capabilities for the `CodeLensKind`.
Expand Down Expand Up @@ -48,7 +47,6 @@ public CodeLensKindCapabilities(final List<String> valueSet) {
* If this property is not present the client only supports the codeLens kinds
* from `File` to `Array` as defined in the initial version of the protocol.
*/
@Pure
public List<String> getValueSet() {
return this.valueSet;
}
Expand All @@ -66,15 +64,13 @@ public void setValueSet(final List<String> valueSet) {
}

@Override
@Pure
public String toString() {
ToStringBuilder b = new ToStringBuilder(this);
b.add("valueSet", this.valueSet);
return b.toString();
}

@Override
@Pure
public boolean equals(final Object obj) {
if (this == obj) {
return true;
Expand All @@ -97,7 +93,6 @@ public boolean equals(final Object obj) {
}

@Override
@Pure
public int hashCode() {
return 31 * 1 + ((this.valueSet == null) ? 0 : this.valueSet.hashCode());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
package org.eclipse.lemminx.client;

import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
import org.eclipse.lsp4j.jsonrpc.util.ToStringBuilder;

/**
* Extended capabilities specific to the `textDocument/codeLens` request. This capability doesn't belong to LSP specification. See proposal at
Expand Down Expand Up @@ -52,7 +51,6 @@ public ExtendedCodeLensCapabilities(final CodeLensKindCapabilities codeLensKind,
* Specific capabilities for the `CodeLensKind` in the `textDocument/codeLens`
* request.
*/
@Pure
public CodeLensKindCapabilities getCodeLensKind() {
return this.codeLensKind;
}
Expand All @@ -66,7 +64,6 @@ public void setCodeLensKind(final CodeLensKindCapabilities codeLensKind) {
}

@Override
@Pure
public String toString() {
ToStringBuilder b = new ToStringBuilder(this);
b.add("codeLensKind", this.codeLensKind);
Expand All @@ -75,7 +72,6 @@ public String toString() {
}

@Override
@Pure
public boolean equals(final Object obj) {
if (this == obj) {
return true;
Expand All @@ -101,7 +97,6 @@ public boolean equals(final Object obj) {
}

@Override
@Pure
public int hashCode() {
return 31 * super.hashCode() + ((this.codeLensKind == null) ? 0 : this.codeLensKind.hashCode());
}
Expand Down
Loading