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 Diagnostic Tag Capability #366

Merged
merged 3 commits into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -816,13 +816,20 @@ class PublishDiagnosticsCapabilities {
* Whether the client accepts diagnostics with related information.
*/
Boolean relatedInformation

Boolean tagSupport
akaroml marked this conversation as resolved.
Show resolved Hide resolved

new() {
}

new(Boolean relatedInformation) {
this.relatedInformation = relatedInformation
}

new(Boolean relatedInformation, Boolean tagSupport) {
this.relatedInformation = relatedInformation
this.tagSupport = tagSupport
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,20 @@ public class PublishDiagnosticsCapabilities {
*/
private Boolean relatedInformation;

private Boolean tagSupport;

public PublishDiagnosticsCapabilities() {
}

public PublishDiagnosticsCapabilities(final Boolean relatedInformation) {
this.relatedInformation = relatedInformation;
}

public PublishDiagnosticsCapabilities(final Boolean relatedInformation, final Boolean tagSupport) {
this.relatedInformation = relatedInformation;
this.tagSupport = tagSupport;
}

/**
* Whether the client accepts diagnostics with related information.
*/
Expand All @@ -46,11 +53,21 @@ public void setRelatedInformation(final Boolean relatedInformation) {
this.relatedInformation = relatedInformation;
}

@Pure
public Boolean getTagSupport() {
return this.tagSupport;
}

public void setTagSupport(final Boolean tagSupport) {
this.tagSupport = tagSupport;
}

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

Expand All @@ -69,12 +86,20 @@ public boolean equals(final Object obj) {
return false;
} else if (!this.relatedInformation.equals(other.relatedInformation))
return false;
if (this.tagSupport == null) {
if (other.tagSupport != null)
return false;
} else if (!this.tagSupport.equals(other.tagSupport))
return false;
return true;
}

@Override
@Pure
public int hashCode() {
return 31 * 1 + ((this.relatedInformation== null) ? 0 : this.relatedInformation.hashCode());
final int prime = 31;
int result = 1;
result = prime * result + ((this.relatedInformation== null) ? 0 : this.relatedInformation.hashCode());
return prime * result + ((this.tagSupport== null) ? 0 : this.tagSupport.hashCode());
}
}