Internal change
PiperOrigin-RevId: 383873010
Change-Id: Iea5806e6603f3af9c581dda0931afa18190de28f
diff --git a/java/org/eclipse/lsp4j/AbstractTextDocumentRegistrationAndWorkDoneProgressOptions.java b/java/org/eclipse/lsp4j/AbstractTextDocumentRegistrationAndWorkDoneProgressOptions.java
new file mode 100644
index 0000000..bf5de50
--- /dev/null
+++ b/java/org/eclipse/lsp4j/AbstractTextDocumentRegistrationAndWorkDoneProgressOptions.java
@@ -0,0 +1,82 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.DocumentFilter;
+import org.eclipse.lsp4j.TextDocumentRegistrationOptions;
+import org.eclipse.lsp4j.WorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Options to signal work done progress support in server capabilities and TextDocumentRegistrationOptions.
+ * It is not present in protocol specification, so it's just "dry" class.
+ * <p>
+ * Since 3.15.0
+ */
+@SuppressWarnings("all")
+public abstract class AbstractTextDocumentRegistrationAndWorkDoneProgressOptions extends TextDocumentRegistrationOptions implements WorkDoneProgressOptions {
+ private Boolean workDoneProgress;
+
+ public AbstractTextDocumentRegistrationAndWorkDoneProgressOptions() {
+ }
+
+ public AbstractTextDocumentRegistrationAndWorkDoneProgressOptions(final List<DocumentFilter> documentSelector) {
+ super(documentSelector);
+ }
+
+ @Pure
+ @Override
+ public Boolean getWorkDoneProgress() {
+ return this.workDoneProgress;
+ }
+
+ public void setWorkDoneProgress(final Boolean workDoneProgress) {
+ this.workDoneProgress = workDoneProgress;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneProgress", this.workDoneProgress);
+ b.add("documentSelector", getDocumentSelector());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ AbstractTextDocumentRegistrationAndWorkDoneProgressOptions other = (AbstractTextDocumentRegistrationAndWorkDoneProgressOptions) obj;
+ if (this.workDoneProgress == null) {
+ if (other.workDoneProgress != null)
+ return false;
+ } else if (!this.workDoneProgress.equals(other.workDoneProgress))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.workDoneProgress== null) ? 0 : this.workDoneProgress.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/AbstractWorkDoneProgressOptions.java b/java/org/eclipse/lsp4j/AbstractWorkDoneProgressOptions.java
new file mode 100644
index 0000000..f32ff60
--- /dev/null
+++ b/java/org/eclipse/lsp4j/AbstractWorkDoneProgressOptions.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.WorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Options to signal work done progress support in server capabilities.
+ * It is not present in protocol specification, so it's just "dry" class.
+ * <p>
+ * Since 3.15.0
+ */
+@SuppressWarnings("all")
+public abstract class AbstractWorkDoneProgressOptions implements WorkDoneProgressOptions {
+ private Boolean workDoneProgress;
+
+ @Pure
+ @Override
+ public Boolean getWorkDoneProgress() {
+ return this.workDoneProgress;
+ }
+
+ public void setWorkDoneProgress(final Boolean workDoneProgress) {
+ this.workDoneProgress = workDoneProgress;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneProgress", this.workDoneProgress);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ AbstractWorkDoneProgressOptions other = (AbstractWorkDoneProgressOptions) obj;
+ if (this.workDoneProgress == null) {
+ if (other.workDoneProgress != null)
+ return false;
+ } else if (!this.workDoneProgress.equals(other.workDoneProgress))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.workDoneProgress== null) ? 0 : this.workDoneProgress.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/AnnotatedTextEdit.java b/java/org/eclipse/lsp4j/AnnotatedTextEdit.java
new file mode 100644
index 0000000..89f3e1f
--- /dev/null
+++ b/java/org/eclipse/lsp4j/AnnotatedTextEdit.java
@@ -0,0 +1,93 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.TextEdit;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * A special text edit with an additional change annotation.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class AnnotatedTextEdit extends TextEdit {
+ /**
+ * The actual annotation identifier
+ */
+ @NonNull
+ private String annotationId;
+
+ public AnnotatedTextEdit() {
+ }
+
+ public AnnotatedTextEdit(@NonNull final Range range, @NonNull final String newText, @NonNull final String annotationId) {
+ super(range, newText);
+ this.annotationId = Preconditions.<String>checkNotNull(annotationId, "annotationId");
+ }
+
+ /**
+ * The actual annotation identifier
+ */
+ @Pure
+ @NonNull
+ public String getAnnotationId() {
+ return this.annotationId;
+ }
+
+ /**
+ * The actual annotation identifier
+ */
+ public void setAnnotationId(@NonNull final String annotationId) {
+ this.annotationId = Preconditions.checkNotNull(annotationId, "annotationId");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("annotationId", this.annotationId);
+ b.add("range", getRange());
+ b.add("newText", getNewText());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ AnnotatedTextEdit other = (AnnotatedTextEdit) obj;
+ if (this.annotationId == null) {
+ if (other.annotationId != null)
+ return false;
+ } else if (!this.annotationId.equals(other.annotationId))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.annotationId== null) ? 0 : this.annotationId.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ApplyWorkspaceEditParams.java b/java/org/eclipse/lsp4j/ApplyWorkspaceEditParams.java
new file mode 100644
index 0000000..8396542
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ApplyWorkspaceEditParams.java
@@ -0,0 +1,125 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.WorkspaceEdit;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The workspace/applyEdit request is sent from the server to the client to modify resource on the client side.
+ */
+@SuppressWarnings("all")
+public class ApplyWorkspaceEditParams {
+ /**
+ * The edits to apply.
+ */
+ @NonNull
+ private WorkspaceEdit edit;
+
+ /**
+ * An optional label of the workspace edit. This label is
+ * presented in the user interface for example on an undo
+ * stack to undo the workspace edit.
+ */
+ private String label;
+
+ public ApplyWorkspaceEditParams() {
+ }
+
+ public ApplyWorkspaceEditParams(@NonNull final WorkspaceEdit edit) {
+ this.edit = Preconditions.<WorkspaceEdit>checkNotNull(edit, "edit");
+ }
+
+ public ApplyWorkspaceEditParams(@NonNull final WorkspaceEdit edit, final String label) {
+ this(edit);
+ this.label = label;
+ }
+
+ /**
+ * The edits to apply.
+ */
+ @Pure
+ @NonNull
+ public WorkspaceEdit getEdit() {
+ return this.edit;
+ }
+
+ /**
+ * The edits to apply.
+ */
+ public void setEdit(@NonNull final WorkspaceEdit edit) {
+ this.edit = Preconditions.checkNotNull(edit, "edit");
+ }
+
+ /**
+ * An optional label of the workspace edit. This label is
+ * presented in the user interface for example on an undo
+ * stack to undo the workspace edit.
+ */
+ @Pure
+ public String getLabel() {
+ return this.label;
+ }
+
+ /**
+ * An optional label of the workspace edit. This label is
+ * presented in the user interface for example on an undo
+ * stack to undo the workspace edit.
+ */
+ public void setLabel(final String label) {
+ this.label = label;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("edit", this.edit);
+ b.add("label", this.label);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ApplyWorkspaceEditParams other = (ApplyWorkspaceEditParams) obj;
+ if (this.edit == null) {
+ if (other.edit != null)
+ return false;
+ } else if (!this.edit.equals(other.edit))
+ return false;
+ if (this.label == null) {
+ if (other.label != null)
+ return false;
+ } else if (!this.label.equals(other.label))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.edit== null) ? 0 : this.edit.hashCode());
+ return prime * result + ((this.label== null) ? 0 : this.label.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ApplyWorkspaceEditResponse.java b/java/org/eclipse/lsp4j/ApplyWorkspaceEditResponse.java
new file mode 100644
index 0000000..134c195
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ApplyWorkspaceEditResponse.java
@@ -0,0 +1,145 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class ApplyWorkspaceEditResponse {
+ /**
+ * Indicates whether the edit was applied or not.
+ */
+ private boolean applied;
+
+ /**
+ * An optional textual description for why the edit was not applied.
+ * This may be used by the server for diagnostic logging or to provide
+ * a suitable error for a request that triggered the edit.
+ */
+ private String failureReason;
+
+ /**
+ * Depending on the client's failure handling strategy `failedChange`
+ * might contain the index of the change that failed. This property is
+ * only available if the client signals a {@link WorkspaceEditCapabilities#failureHandling}
+ * strategy in its client capabilities.
+ */
+ private Integer failedChange;
+
+ public ApplyWorkspaceEditResponse() {
+ }
+
+ public ApplyWorkspaceEditResponse(final boolean applied) {
+ this.applied = applied;
+ }
+
+ /**
+ * Indicates whether the edit was applied or not.
+ */
+ @Pure
+ public boolean isApplied() {
+ return this.applied;
+ }
+
+ /**
+ * Indicates whether the edit was applied or not.
+ */
+ public void setApplied(final boolean applied) {
+ this.applied = applied;
+ }
+
+ /**
+ * An optional textual description for why the edit was not applied.
+ * This may be used by the server for diagnostic logging or to provide
+ * a suitable error for a request that triggered the edit.
+ */
+ @Pure
+ public String getFailureReason() {
+ return this.failureReason;
+ }
+
+ /**
+ * An optional textual description for why the edit was not applied.
+ * This may be used by the server for diagnostic logging or to provide
+ * a suitable error for a request that triggered the edit.
+ */
+ public void setFailureReason(final String failureReason) {
+ this.failureReason = failureReason;
+ }
+
+ /**
+ * Depending on the client's failure handling strategy `failedChange`
+ * might contain the index of the change that failed. This property is
+ * only available if the client signals a {@link WorkspaceEditCapabilities#failureHandling}
+ * strategy in its client capabilities.
+ */
+ @Pure
+ public Integer getFailedChange() {
+ return this.failedChange;
+ }
+
+ /**
+ * Depending on the client's failure handling strategy `failedChange`
+ * might contain the index of the change that failed. This property is
+ * only available if the client signals a {@link WorkspaceEditCapabilities#failureHandling}
+ * strategy in its client capabilities.
+ */
+ public void setFailedChange(final Integer failedChange) {
+ this.failedChange = failedChange;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("applied", this.applied);
+ b.add("failureReason", this.failureReason);
+ b.add("failedChange", this.failedChange);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ApplyWorkspaceEditResponse other = (ApplyWorkspaceEditResponse) obj;
+ if (other.applied != this.applied)
+ return false;
+ if (this.failureReason == null) {
+ if (other.failureReason != null)
+ return false;
+ } else if (!this.failureReason.equals(other.failureReason))
+ return false;
+ if (this.failedChange == null) {
+ if (other.failedChange != null)
+ return false;
+ } else if (!this.failedChange.equals(other.failedChange))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (this.applied ? 1231 : 1237);
+ result = prime * result + ((this.failureReason== null) ? 0 : this.failureReason.hashCode());
+ return prime * result + ((this.failedChange== null) ? 0 : this.failedChange.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CallHierarchyCapabilities.java b/java/org/eclipse/lsp4j/CallHierarchyCapabilities.java
new file mode 100644
index 0000000..2044f67
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CallHierarchyCapabilities.java
@@ -0,0 +1,59 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Capabilities specific to the {@code textDocument/prepareCallHierarchy}.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CallHierarchyCapabilities extends DynamicRegistrationCapabilities {
+ public CallHierarchyCapabilities() {
+ }
+
+ public CallHierarchyCapabilities(final Boolean dynamicRegistration) {
+ super(dynamicRegistration);
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("dynamicRegistration", getDynamicRegistration());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CallHierarchyIncomingCall.java b/java/org/eclipse/lsp4j/CallHierarchyIncomingCall.java
new file mode 100644
index 0000000..6067078
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CallHierarchyIncomingCall.java
@@ -0,0 +1,124 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.CallHierarchyItem;
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Represents an incoming call, e.g. a caller of a method or constructor.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CallHierarchyIncomingCall {
+ /**
+ * The item that makes the call.
+ */
+ @NonNull
+ private CallHierarchyItem from;
+
+ /**
+ * The range at which at which the calls appears. This is relative to the caller
+ * denoted by {@link #from}.
+ */
+ @NonNull
+ private List<Range> fromRanges;
+
+ public CallHierarchyIncomingCall() {
+ }
+
+ public CallHierarchyIncomingCall(@NonNull final CallHierarchyItem from, @NonNull final List<Range> fromRanges) {
+ this.from = Preconditions.<CallHierarchyItem>checkNotNull(from, "from");
+ this.fromRanges = Preconditions.<List<Range>>checkNotNull(fromRanges, "fromRanges");
+ }
+
+ /**
+ * The item that makes the call.
+ */
+ @Pure
+ @NonNull
+ public CallHierarchyItem getFrom() {
+ return this.from;
+ }
+
+ /**
+ * The item that makes the call.
+ */
+ public void setFrom(@NonNull final CallHierarchyItem from) {
+ this.from = Preconditions.checkNotNull(from, "from");
+ }
+
+ /**
+ * The range at which at which the calls appears. This is relative to the caller
+ * denoted by {@link #from}.
+ */
+ @Pure
+ @NonNull
+ public List<Range> getFromRanges() {
+ return this.fromRanges;
+ }
+
+ /**
+ * The range at which at which the calls appears. This is relative to the caller
+ * denoted by {@link #from}.
+ */
+ public void setFromRanges(@NonNull final List<Range> fromRanges) {
+ this.fromRanges = Preconditions.checkNotNull(fromRanges, "fromRanges");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("from", this.from);
+ b.add("fromRanges", this.fromRanges);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CallHierarchyIncomingCall other = (CallHierarchyIncomingCall) obj;
+ if (this.from == null) {
+ if (other.from != null)
+ return false;
+ } else if (!this.from.equals(other.from))
+ return false;
+ if (this.fromRanges == null) {
+ if (other.fromRanges != null)
+ return false;
+ } else if (!this.fromRanges.equals(other.fromRanges))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.from== null) ? 0 : this.from.hashCode());
+ return prime * result + ((this.fromRanges== null) ? 0 : this.fromRanges.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CallHierarchyIncomingCallsParams.java b/java/org/eclipse/lsp4j/CallHierarchyIncomingCallsParams.java
new file mode 100644
index 0000000..316831b
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CallHierarchyIncomingCallsParams.java
@@ -0,0 +1,83 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.CallHierarchyItem;
+import org.eclipse.lsp4j.WorkDoneProgressAndPartialResultParams;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The parameter of a `callHierarchy/incomingCalls` request.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CallHierarchyIncomingCallsParams extends WorkDoneProgressAndPartialResultParams {
+ @NonNull
+ private CallHierarchyItem item;
+
+ public CallHierarchyIncomingCallsParams() {
+ }
+
+ public CallHierarchyIncomingCallsParams(@NonNull final CallHierarchyItem item) {
+ this.item = Preconditions.<CallHierarchyItem>checkNotNull(item, "item");
+ }
+
+ @Pure
+ @NonNull
+ public CallHierarchyItem getItem() {
+ return this.item;
+ }
+
+ public void setItem(@NonNull final CallHierarchyItem item) {
+ this.item = Preconditions.checkNotNull(item, "item");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("item", this.item);
+ b.add("workDoneToken", getWorkDoneToken());
+ b.add("partialResultToken", getPartialResultToken());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CallHierarchyIncomingCallsParams other = (CallHierarchyIncomingCallsParams) obj;
+ if (this.item == null) {
+ if (other.item != null)
+ return false;
+ } else if (!this.item.equals(other.item))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.item== null) ? 0 : this.item.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CallHierarchyItem.java b/java/org/eclipse/lsp4j/CallHierarchyItem.java
new file mode 100644
index 0000000..87108fd
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CallHierarchyItem.java
@@ -0,0 +1,297 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import com.google.gson.annotations.JsonAdapter;
+import java.util.List;
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.SymbolKind;
+import org.eclipse.lsp4j.SymbolTag;
+import org.eclipse.lsp4j.jsonrpc.json.adapters.JsonElementTypeAdapter;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The result of a {@code textDocument/prepareCallHierarchy} request.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CallHierarchyItem {
+ /**
+ * The name of the item targeted by the call hierarchy request.
+ */
+ @NonNull
+ private String name;
+
+ /**
+ * More detail for this item, e.g the signature of a function.
+ */
+ private String detail;
+
+ /**
+ * The kind of this item.
+ */
+ @NonNull
+ private SymbolKind kind;
+
+ /**
+ * Tags for this item.
+ */
+ private List<SymbolTag> tags;
+
+ /**
+ * The resource identifier of this item.
+ */
+ @NonNull
+ private String uri;
+
+ /**
+ * The range enclosing this symbol not including leading/trailing whitespace but everything else
+ * like comments. This information is typically used to determine if the the clients cursor is
+ * inside the symbol to reveal in the symbol in the UI.
+ */
+ @NonNull
+ private Range range;
+
+ /**
+ * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
+ * Must be contained by the the {@link CallHierarchyItem#getRange range}.
+ */
+ @NonNull
+ private Range selectionRange;
+
+ /**
+ * A data entry field that is preserved between a call hierarchy prepare and
+ * incoming calls or outgoing calls requests.
+ */
+ @JsonAdapter(JsonElementTypeAdapter.Factory.class)
+ private Object data;
+
+ /**
+ * The name of the item targeted by the call hierarchy request.
+ */
+ @Pure
+ @NonNull
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * The name of the item targeted by the call hierarchy request.
+ */
+ public void setName(@NonNull final String name) {
+ this.name = Preconditions.checkNotNull(name, "name");
+ }
+
+ /**
+ * More detail for this item, e.g the signature of a function.
+ */
+ @Pure
+ public String getDetail() {
+ return this.detail;
+ }
+
+ /**
+ * More detail for this item, e.g the signature of a function.
+ */
+ public void setDetail(final String detail) {
+ this.detail = detail;
+ }
+
+ /**
+ * The kind of this item.
+ */
+ @Pure
+ @NonNull
+ public SymbolKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * The kind of this item.
+ */
+ public void setKind(@NonNull final SymbolKind kind) {
+ this.kind = Preconditions.checkNotNull(kind, "kind");
+ }
+
+ /**
+ * Tags for this item.
+ */
+ @Pure
+ public List<SymbolTag> getTags() {
+ return this.tags;
+ }
+
+ /**
+ * Tags for this item.
+ */
+ public void setTags(final List<SymbolTag> tags) {
+ this.tags = tags;
+ }
+
+ /**
+ * The resource identifier of this item.
+ */
+ @Pure
+ @NonNull
+ public String getUri() {
+ return this.uri;
+ }
+
+ /**
+ * The resource identifier of this item.
+ */
+ public void setUri(@NonNull final String uri) {
+ this.uri = Preconditions.checkNotNull(uri, "uri");
+ }
+
+ /**
+ * The range enclosing this symbol not including leading/trailing whitespace but everything else
+ * like comments. This information is typically used to determine if the the clients cursor is
+ * inside the symbol to reveal in the symbol in the UI.
+ */
+ @Pure
+ @NonNull
+ public Range getRange() {
+ return this.range;
+ }
+
+ /**
+ * The range enclosing this symbol not including leading/trailing whitespace but everything else
+ * like comments. This information is typically used to determine if the the clients cursor is
+ * inside the symbol to reveal in the symbol in the UI.
+ */
+ public void setRange(@NonNull final Range range) {
+ this.range = Preconditions.checkNotNull(range, "range");
+ }
+
+ /**
+ * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
+ * Must be contained by the the {@link CallHierarchyItem#getRange range}.
+ */
+ @Pure
+ @NonNull
+ public Range getSelectionRange() {
+ return this.selectionRange;
+ }
+
+ /**
+ * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
+ * Must be contained by the the {@link CallHierarchyItem#getRange range}.
+ */
+ public void setSelectionRange(@NonNull final Range selectionRange) {
+ this.selectionRange = Preconditions.checkNotNull(selectionRange, "selectionRange");
+ }
+
+ /**
+ * A data entry field that is preserved between a call hierarchy prepare and
+ * incoming calls or outgoing calls requests.
+ */
+ @Pure
+ public Object getData() {
+ return this.data;
+ }
+
+ /**
+ * A data entry field that is preserved between a call hierarchy prepare and
+ * incoming calls or outgoing calls requests.
+ */
+ public void setData(final Object data) {
+ this.data = data;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("name", this.name);
+ b.add("detail", this.detail);
+ b.add("kind", this.kind);
+ b.add("tags", this.tags);
+ b.add("uri", this.uri);
+ b.add("range", this.range);
+ b.add("selectionRange", this.selectionRange);
+ b.add("data", this.data);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CallHierarchyItem other = (CallHierarchyItem) obj;
+ if (this.name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!this.name.equals(other.name))
+ return false;
+ if (this.detail == null) {
+ if (other.detail != null)
+ return false;
+ } else if (!this.detail.equals(other.detail))
+ return false;
+ if (this.kind == null) {
+ if (other.kind != null)
+ return false;
+ } else if (!this.kind.equals(other.kind))
+ return false;
+ if (this.tags == null) {
+ if (other.tags != null)
+ return false;
+ } else if (!this.tags.equals(other.tags))
+ return false;
+ if (this.uri == null) {
+ if (other.uri != null)
+ return false;
+ } else if (!this.uri.equals(other.uri))
+ return false;
+ if (this.range == null) {
+ if (other.range != null)
+ return false;
+ } else if (!this.range.equals(other.range))
+ return false;
+ if (this.selectionRange == null) {
+ if (other.selectionRange != null)
+ return false;
+ } else if (!this.selectionRange.equals(other.selectionRange))
+ return false;
+ if (this.data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!this.data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.name== null) ? 0 : this.name.hashCode());
+ result = prime * result + ((this.detail== null) ? 0 : this.detail.hashCode());
+ result = prime * result + ((this.kind== null) ? 0 : this.kind.hashCode());
+ result = prime * result + ((this.tags== null) ? 0 : this.tags.hashCode());
+ result = prime * result + ((this.uri== null) ? 0 : this.uri.hashCode());
+ result = prime * result + ((this.range== null) ? 0 : this.range.hashCode());
+ result = prime * result + ((this.selectionRange== null) ? 0 : this.selectionRange.hashCode());
+ return prime * result + ((this.data== null) ? 0 : this.data.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CallHierarchyOptions.java b/java/org/eclipse/lsp4j/CallHierarchyOptions.java
new file mode 100644
index 0000000..f081f33
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CallHierarchyOptions.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CallHierarchyOptions extends AbstractWorkDoneProgressOptions {
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CallHierarchyOutgoingCall.java b/java/org/eclipse/lsp4j/CallHierarchyOutgoingCall.java
new file mode 100644
index 0000000..f506a70
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CallHierarchyOutgoingCall.java
@@ -0,0 +1,121 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.CallHierarchyItem;
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CallHierarchyOutgoingCall {
+ /**
+ * The item that is called.
+ */
+ @NonNull
+ private CallHierarchyItem to;
+
+ /**
+ * The range at which this item is called. This is the range relative to the caller, i.e. the {@link CallHierarchyOutgoingCallsParams#item}.
+ */
+ @NonNull
+ private List<Range> fromRanges;
+
+ public CallHierarchyOutgoingCall() {
+ }
+
+ public CallHierarchyOutgoingCall(@NonNull final CallHierarchyItem to, @NonNull final List<Range> fromRanges) {
+ this.to = Preconditions.<CallHierarchyItem>checkNotNull(to, "to");
+ this.fromRanges = Preconditions.<List<Range>>checkNotNull(fromRanges, "fromRanges");
+ }
+
+ /**
+ * The item that is called.
+ */
+ @Pure
+ @NonNull
+ public CallHierarchyItem getTo() {
+ return this.to;
+ }
+
+ /**
+ * The item that is called.
+ */
+ public void setTo(@NonNull final CallHierarchyItem to) {
+ this.to = Preconditions.checkNotNull(to, "to");
+ }
+
+ /**
+ * The range at which this item is called. This is the range relative to the caller, i.e. the {@link CallHierarchyOutgoingCallsParams#item}.
+ */
+ @Pure
+ @NonNull
+ public List<Range> getFromRanges() {
+ return this.fromRanges;
+ }
+
+ /**
+ * The range at which this item is called. This is the range relative to the caller, i.e. the {@link CallHierarchyOutgoingCallsParams#item}.
+ */
+ public void setFromRanges(@NonNull final List<Range> fromRanges) {
+ this.fromRanges = Preconditions.checkNotNull(fromRanges, "fromRanges");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("to", this.to);
+ b.add("fromRanges", this.fromRanges);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CallHierarchyOutgoingCall other = (CallHierarchyOutgoingCall) obj;
+ if (this.to == null) {
+ if (other.to != null)
+ return false;
+ } else if (!this.to.equals(other.to))
+ return false;
+ if (this.fromRanges == null) {
+ if (other.fromRanges != null)
+ return false;
+ } else if (!this.fromRanges.equals(other.fromRanges))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.to== null) ? 0 : this.to.hashCode());
+ return prime * result + ((this.fromRanges== null) ? 0 : this.fromRanges.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CallHierarchyOutgoingCallsParams.java b/java/org/eclipse/lsp4j/CallHierarchyOutgoingCallsParams.java
new file mode 100644
index 0000000..32a4af7
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CallHierarchyOutgoingCallsParams.java
@@ -0,0 +1,83 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.CallHierarchyItem;
+import org.eclipse.lsp4j.WorkDoneProgressAndPartialResultParams;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The parameter of a `callHierarchy/outgoingCalls` request.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CallHierarchyOutgoingCallsParams extends WorkDoneProgressAndPartialResultParams {
+ @NonNull
+ private CallHierarchyItem item;
+
+ public CallHierarchyOutgoingCallsParams() {
+ }
+
+ public CallHierarchyOutgoingCallsParams(@NonNull final CallHierarchyItem item) {
+ this.item = Preconditions.<CallHierarchyItem>checkNotNull(item, "item");
+ }
+
+ @Pure
+ @NonNull
+ public CallHierarchyItem getItem() {
+ return this.item;
+ }
+
+ public void setItem(@NonNull final CallHierarchyItem item) {
+ this.item = Preconditions.checkNotNull(item, "item");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("item", this.item);
+ b.add("workDoneToken", getWorkDoneToken());
+ b.add("partialResultToken", getPartialResultToken());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CallHierarchyOutgoingCallsParams other = (CallHierarchyOutgoingCallsParams) obj;
+ if (this.item == null) {
+ if (other.item != null)
+ return false;
+ } else if (!this.item.equals(other.item))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.item== null) ? 0 : this.item.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CallHierarchyPrepareParams.java b/java/org/eclipse/lsp4j/CallHierarchyPrepareParams.java
new file mode 100644
index 0000000..a5570ae
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CallHierarchyPrepareParams.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.TextDocumentPositionAndWorkDoneProgressParams;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The parameter of a `textDocument/prepareCallHierarchy` request.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CallHierarchyPrepareParams extends TextDocumentPositionAndWorkDoneProgressParams {
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneToken", getWorkDoneToken());
+ b.add("textDocument", getTextDocument());
+ b.add("uri", getUri());
+ b.add("position", getPosition());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CallHierarchyRegistrationOptions.java b/java/org/eclipse/lsp4j/CallHierarchyRegistrationOptions.java
new file mode 100644
index 0000000..006963b
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CallHierarchyRegistrationOptions.java
@@ -0,0 +1,88 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractTextDocumentRegistrationAndWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CallHierarchyRegistrationOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions {
+ /**
+ * The id used to register the request. The id can be used to deregister
+ * the request again. See also Registration#id.
+ */
+ private String id;
+
+ public CallHierarchyRegistrationOptions() {
+ }
+
+ public CallHierarchyRegistrationOptions(final String id) {
+ this.id = id;
+ }
+
+ /**
+ * The id used to register the request. The id can be used to deregister
+ * the request again. See also Registration#id.
+ */
+ @Pure
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * The id used to register the request. The id can be used to deregister
+ * the request again. See also Registration#id.
+ */
+ public void setId(final String id) {
+ this.id = id;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("id", this.id);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ b.add("documentSelector", getDocumentSelector());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CallHierarchyRegistrationOptions other = (CallHierarchyRegistrationOptions) obj;
+ if (this.id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!this.id.equals(other.id))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.id== null) ? 0 : this.id.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ChangeAnnotation.java b/java/org/eclipse/lsp4j/ChangeAnnotation.java
new file mode 100644
index 0000000..1d2cf02
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ChangeAnnotation.java
@@ -0,0 +1,151 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Additional information that describes document changes.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class ChangeAnnotation {
+ /**
+ * A human-readable string describing the actual change. The string
+ * is rendered prominent in the user interface.
+ */
+ @NonNull
+ private String label;
+
+ /**
+ * A flag which indicates that user confirmation is needed
+ * before applying the change.
+ */
+ private Boolean needsConfirmation;
+
+ /**
+ * A human-readable string which is rendered less prominent in
+ * the user interface.
+ */
+ private String description;
+
+ public ChangeAnnotation() {
+ }
+
+ public ChangeAnnotation(@NonNull final String label) {
+ this.label = Preconditions.<String>checkNotNull(label, "label");
+ }
+
+ /**
+ * A human-readable string describing the actual change. The string
+ * is rendered prominent in the user interface.
+ */
+ @Pure
+ @NonNull
+ public String getLabel() {
+ return this.label;
+ }
+
+ /**
+ * A human-readable string describing the actual change. The string
+ * is rendered prominent in the user interface.
+ */
+ public void setLabel(@NonNull final String label) {
+ this.label = Preconditions.checkNotNull(label, "label");
+ }
+
+ /**
+ * A flag which indicates that user confirmation is needed
+ * before applying the change.
+ */
+ @Pure
+ public Boolean getNeedsConfirmation() {
+ return this.needsConfirmation;
+ }
+
+ /**
+ * A flag which indicates that user confirmation is needed
+ * before applying the change.
+ */
+ public void setNeedsConfirmation(final Boolean needsConfirmation) {
+ this.needsConfirmation = needsConfirmation;
+ }
+
+ /**
+ * A human-readable string which is rendered less prominent in
+ * the user interface.
+ */
+ @Pure
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * A human-readable string which is rendered less prominent in
+ * the user interface.
+ */
+ public void setDescription(final String description) {
+ this.description = description;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("label", this.label);
+ b.add("needsConfirmation", this.needsConfirmation);
+ b.add("description", this.description);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ChangeAnnotation other = (ChangeAnnotation) obj;
+ if (this.label == null) {
+ if (other.label != null)
+ return false;
+ } else if (!this.label.equals(other.label))
+ return false;
+ if (this.needsConfirmation == null) {
+ if (other.needsConfirmation != null)
+ return false;
+ } else if (!this.needsConfirmation.equals(other.needsConfirmation))
+ return false;
+ if (this.description == null) {
+ if (other.description != null)
+ return false;
+ } else if (!this.description.equals(other.description))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.label== null) ? 0 : this.label.hashCode());
+ result = prime * result + ((this.needsConfirmation== null) ? 0 : this.needsConfirmation.hashCode());
+ return prime * result + ((this.description== null) ? 0 : this.description.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ClientCapabilities.java b/java/org/eclipse/lsp4j/ClientCapabilities.java
new file mode 100644
index 0000000..2089726
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ClientCapabilities.java
@@ -0,0 +1,222 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import com.google.gson.annotations.JsonAdapter;
+import org.eclipse.lsp4j.GeneralClientCapabilities;
+import org.eclipse.lsp4j.TextDocumentClientCapabilities;
+import org.eclipse.lsp4j.WindowClientCapabilities;
+import org.eclipse.lsp4j.WorkspaceClientCapabilities;
+import org.eclipse.lsp4j.jsonrpc.json.adapters.JsonElementTypeAdapter;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * `ClientCapabilities` now define capabilities for dynamic registration, workspace and text document features the client supports.
+ * The {@link #experimental} can be used to pass experimental capabilities under development.
+ * For future compatibility a `ClientCapabilities` object literal can have more properties set than currently defined.
+ * Servers receiving a `ClientCapabilities` object literal with unknown properties should ignore these properties.
+ * A missing property should be interpreted as an absence of the capability.
+ * If a property is missing that defines sub properties all sub properties should be interpreted as an absence of the capability.
+ * <p>
+ * Client capabilities got introduced with the version 3.0 of the protocol. They therefore only describe capabilities that got introduced in 3.x or later.
+ * Capabilities that existed in the 2.x version of the protocol are still mandatory for clients. Clients cannot opt out of providing them.
+ * So even if a client omits the {@link TextDocumentClientCapabilities#synchronization}
+ * it is still required that the client provides text document synchronization (e.g. open, changed and close notifications).
+ */
+@SuppressWarnings("all")
+public class ClientCapabilities {
+ /**
+ * Workspace specific client capabilities.
+ */
+ private WorkspaceClientCapabilities workspace;
+
+ /**
+ * Text document specific client capabilities.
+ */
+ private TextDocumentClientCapabilities textDocument;
+
+ /**
+ * Window specific client capabilities.
+ */
+ private WindowClientCapabilities window;
+
+ /**
+ * General client capabilities.
+ * <p>
+ * Since 3.16.0
+ */
+ private GeneralClientCapabilities general;
+
+ /**
+ * Experimental client capabilities.
+ */
+ @JsonAdapter(JsonElementTypeAdapter.Factory.class)
+ private Object experimental;
+
+ public ClientCapabilities() {
+ }
+
+ public ClientCapabilities(final WorkspaceClientCapabilities workspace, final TextDocumentClientCapabilities textDocument, final Object experimental) {
+ this.workspace = workspace;
+ this.textDocument = textDocument;
+ this.experimental = experimental;
+ }
+
+ public ClientCapabilities(final WorkspaceClientCapabilities workspace, final TextDocumentClientCapabilities textDocument, final WindowClientCapabilities window, final Object experimental) {
+ this.workspace = workspace;
+ this.textDocument = textDocument;
+ this.window = window;
+ this.experimental = experimental;
+ }
+
+ /**
+ * Workspace specific client capabilities.
+ */
+ @Pure
+ public WorkspaceClientCapabilities getWorkspace() {
+ return this.workspace;
+ }
+
+ /**
+ * Workspace specific client capabilities.
+ */
+ public void setWorkspace(final WorkspaceClientCapabilities workspace) {
+ this.workspace = workspace;
+ }
+
+ /**
+ * Text document specific client capabilities.
+ */
+ @Pure
+ public TextDocumentClientCapabilities getTextDocument() {
+ return this.textDocument;
+ }
+
+ /**
+ * Text document specific client capabilities.
+ */
+ public void setTextDocument(final TextDocumentClientCapabilities textDocument) {
+ this.textDocument = textDocument;
+ }
+
+ /**
+ * Window specific client capabilities.
+ */
+ @Pure
+ public WindowClientCapabilities getWindow() {
+ return this.window;
+ }
+
+ /**
+ * Window specific client capabilities.
+ */
+ public void setWindow(final WindowClientCapabilities window) {
+ this.window = window;
+ }
+
+ /**
+ * General client capabilities.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public GeneralClientCapabilities getGeneral() {
+ return this.general;
+ }
+
+ /**
+ * General client capabilities.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setGeneral(final GeneralClientCapabilities general) {
+ this.general = general;
+ }
+
+ /**
+ * Experimental client capabilities.
+ */
+ @Pure
+ public Object getExperimental() {
+ return this.experimental;
+ }
+
+ /**
+ * Experimental client capabilities.
+ */
+ public void setExperimental(final Object experimental) {
+ this.experimental = experimental;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workspace", this.workspace);
+ b.add("textDocument", this.textDocument);
+ b.add("window", this.window);
+ b.add("general", this.general);
+ b.add("experimental", this.experimental);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ClientCapabilities other = (ClientCapabilities) obj;
+ if (this.workspace == null) {
+ if (other.workspace != null)
+ return false;
+ } else if (!this.workspace.equals(other.workspace))
+ return false;
+ if (this.textDocument == null) {
+ if (other.textDocument != null)
+ return false;
+ } else if (!this.textDocument.equals(other.textDocument))
+ return false;
+ if (this.window == null) {
+ if (other.window != null)
+ return false;
+ } else if (!this.window.equals(other.window))
+ return false;
+ if (this.general == null) {
+ if (other.general != null)
+ return false;
+ } else if (!this.general.equals(other.general))
+ return false;
+ if (this.experimental == null) {
+ if (other.experimental != null)
+ return false;
+ } else if (!this.experimental.equals(other.experimental))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.workspace== null) ? 0 : this.workspace.hashCode());
+ result = prime * result + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());
+ result = prime * result + ((this.window== null) ? 0 : this.window.hashCode());
+ result = prime * result + ((this.general== null) ? 0 : this.general.hashCode());
+ return prime * result + ((this.experimental== null) ? 0 : this.experimental.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ClientInfo.java b/java/org/eclipse/lsp4j/ClientInfo.java
new file mode 100644
index 0000000..5611ae6
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ClientInfo.java
@@ -0,0 +1,120 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Information about the client
+ * <p>
+ * Since 3.15.0
+ */
+@SuppressWarnings("all")
+public class ClientInfo {
+ /**
+ * The name of the client as defined by the client.
+ */
+ @NonNull
+ private String name;
+
+ /**
+ * The client's version as defined by the client.
+ */
+ private String version;
+
+ public ClientInfo() {
+ }
+
+ public ClientInfo(@NonNull final String name) {
+ this.name = Preconditions.<String>checkNotNull(name, "name");
+ }
+
+ public ClientInfo(@NonNull final String name, final String version) {
+ this(name);
+ this.version = version;
+ }
+
+ /**
+ * The name of the client as defined by the client.
+ */
+ @Pure
+ @NonNull
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * The name of the client as defined by the client.
+ */
+ public void setName(@NonNull final String name) {
+ this.name = Preconditions.checkNotNull(name, "name");
+ }
+
+ /**
+ * The client's version as defined by the client.
+ */
+ @Pure
+ public String getVersion() {
+ return this.version;
+ }
+
+ /**
+ * The client's version as defined by the client.
+ */
+ public void setVersion(final String version) {
+ this.version = version;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("name", this.name);
+ b.add("version", this.version);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ClientInfo other = (ClientInfo) obj;
+ if (this.name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!this.name.equals(other.name))
+ return false;
+ if (this.version == null) {
+ if (other.version != null)
+ return false;
+ } else if (!this.version.equals(other.version))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.name== null) ? 0 : this.name.hashCode());
+ return prime * result + ((this.version== null) ? 0 : this.version.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeAction.java b/java/org/eclipse/lsp4j/CodeAction.java
new file mode 100644
index 0000000..67b94c1
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeAction.java
@@ -0,0 +1,362 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import com.google.gson.annotations.JsonAdapter;
+import java.util.List;
+import org.eclipse.lsp4j.CodeActionDisabled;
+import org.eclipse.lsp4j.Command;
+import org.eclipse.lsp4j.Diagnostic;
+import org.eclipse.lsp4j.WorkspaceEdit;
+import org.eclipse.lsp4j.jsonrpc.json.adapters.JsonElementTypeAdapter;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * A code action represents a change that can be performed in code, e.g. to fix a problem or
+ * to refactor code.
+ * <p>
+ * A CodeAction must set either {@link #edit} and/or a {@link #command}.
+ * If both are supplied, the {@link #edit} is applied first, then the {@link #command} is executed.
+ */
+@SuppressWarnings("all")
+public class CodeAction {
+ /**
+ * A short, human-readable, title for this code action.
+ */
+ @NonNull
+ private String title;
+
+ /**
+ * The kind of the code action.
+ * <p>
+ * Used to filter code actions.
+ */
+ private String kind;
+
+ /**
+ * The diagnostics that this code action resolves.
+ */
+ private List<Diagnostic> diagnostics;
+
+ /**
+ * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted
+ * by keybindings.
+ * <p>
+ * A quick fix should be marked preferred if it properly addresses the underlying error.
+ * A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
+ * <p>
+ * Since 3.15.0
+ */
+ private Boolean isPreferred;
+
+ /**
+ * Marks that the code action cannot currently be applied.
+ * <p>
+ * Clients should follow the following guidelines regarding disabled code actions:
+ * <ul>
+ * <li>Disabled code actions are not shown in automatic <a href="https://code.visualstudio.com/docs/editor/editingevolved#_code-action">lightbulb</a>
+ * code action menu.
+ * <li>Disabled actions are shown as faded out in the code action menu when the user request a more specific type
+ * of code action, such as refactorings.
+ * <li>If the user has a <a href="https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions">keybinding</a>
+ * that auto applies a code action and only a disabled code actions are returned, the client should show the user an
+ * error message with {@link CodeActionDisabled#reason} in the editor.
+ * </ul><p>
+ * Since 3.16.0
+ */
+ private CodeActionDisabled disabled;
+
+ /**
+ * The workspace edit this code action performs.
+ */
+ private WorkspaceEdit edit;
+
+ /**
+ * A command this code action executes. If a code action
+ * provides a edit and a command, first the edit is
+ * executed and then the command.
+ */
+ private Command command;
+
+ /**
+ * A data entry field that is preserved on a code action between
+ * a `textDocument/codeAction` and a `codeAction/resolve` request.
+ * <p>
+ * Since 3.16.0
+ */
+ @JsonAdapter(JsonElementTypeAdapter.Factory.class)
+ private Object data;
+
+ public CodeAction() {
+ }
+
+ public CodeAction(@NonNull final String title) {
+ this.title = Preconditions.<String>checkNotNull(title, "title");
+ }
+
+ /**
+ * A short, human-readable, title for this code action.
+ */
+ @Pure
+ @NonNull
+ public String getTitle() {
+ return this.title;
+ }
+
+ /**
+ * A short, human-readable, title for this code action.
+ */
+ public void setTitle(@NonNull final String title) {
+ this.title = Preconditions.checkNotNull(title, "title");
+ }
+
+ /**
+ * The kind of the code action.
+ * <p>
+ * Used to filter code actions.
+ */
+ @Pure
+ public String getKind() {
+ return this.kind;
+ }
+
+ /**
+ * The kind of the code action.
+ * <p>
+ * Used to filter code actions.
+ */
+ public void setKind(final String kind) {
+ this.kind = kind;
+ }
+
+ /**
+ * The diagnostics that this code action resolves.
+ */
+ @Pure
+ public List<Diagnostic> getDiagnostics() {
+ return this.diagnostics;
+ }
+
+ /**
+ * The diagnostics that this code action resolves.
+ */
+ public void setDiagnostics(final List<Diagnostic> diagnostics) {
+ this.diagnostics = diagnostics;
+ }
+
+ /**
+ * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted
+ * by keybindings.
+ * <p>
+ * A quick fix should be marked preferred if it properly addresses the underlying error.
+ * A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
+ * <p>
+ * Since 3.15.0
+ */
+ @Pure
+ public Boolean getIsPreferred() {
+ return this.isPreferred;
+ }
+
+ /**
+ * Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted
+ * by keybindings.
+ * <p>
+ * A quick fix should be marked preferred if it properly addresses the underlying error.
+ * A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
+ * <p>
+ * Since 3.15.0
+ */
+ public void setIsPreferred(final Boolean isPreferred) {
+ this.isPreferred = isPreferred;
+ }
+
+ /**
+ * Marks that the code action cannot currently be applied.
+ * <p>
+ * Clients should follow the following guidelines regarding disabled code actions:
+ * <ul>
+ * <li>Disabled code actions are not shown in automatic <a href="https://code.visualstudio.com/docs/editor/editingevolved#_code-action">lightbulb</a>
+ * code action menu.
+ * <li>Disabled actions are shown as faded out in the code action menu when the user request a more specific type
+ * of code action, such as refactorings.
+ * <li>If the user has a <a href="https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions">keybinding</a>
+ * that auto applies a code action and only a disabled code actions are returned, the client should show the user an
+ * error message with {@link CodeActionDisabled#reason} in the editor.
+ * </ul><p>
+ * Since 3.16.0
+ */
+ @Pure
+ public CodeActionDisabled getDisabled() {
+ return this.disabled;
+ }
+
+ /**
+ * Marks that the code action cannot currently be applied.
+ * <p>
+ * Clients should follow the following guidelines regarding disabled code actions:
+ * <ul>
+ * <li>Disabled code actions are not shown in automatic <a href="https://code.visualstudio.com/docs/editor/editingevolved#_code-action">lightbulb</a>
+ * code action menu.
+ * <li>Disabled actions are shown as faded out in the code action menu when the user request a more specific type
+ * of code action, such as refactorings.
+ * <li>If the user has a <a href="https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions">keybinding</a>
+ * that auto applies a code action and only a disabled code actions are returned, the client should show the user an
+ * error message with {@link CodeActionDisabled#reason} in the editor.
+ * </ul><p>
+ * Since 3.16.0
+ */
+ public void setDisabled(final CodeActionDisabled disabled) {
+ this.disabled = disabled;
+ }
+
+ /**
+ * The workspace edit this code action performs.
+ */
+ @Pure
+ public WorkspaceEdit getEdit() {
+ return this.edit;
+ }
+
+ /**
+ * The workspace edit this code action performs.
+ */
+ public void setEdit(final WorkspaceEdit edit) {
+ this.edit = edit;
+ }
+
+ /**
+ * A command this code action executes. If a code action
+ * provides a edit and a command, first the edit is
+ * executed and then the command.
+ */
+ @Pure
+ public Command getCommand() {
+ return this.command;
+ }
+
+ /**
+ * A command this code action executes. If a code action
+ * provides a edit and a command, first the edit is
+ * executed and then the command.
+ */
+ public void setCommand(final Command command) {
+ this.command = command;
+ }
+
+ /**
+ * A data entry field that is preserved on a code action between
+ * a `textDocument/codeAction` and a `codeAction/resolve` request.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public Object getData() {
+ return this.data;
+ }
+
+ /**
+ * A data entry field that is preserved on a code action between
+ * a `textDocument/codeAction` and a `codeAction/resolve` request.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setData(final Object data) {
+ this.data = data;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("title", this.title);
+ b.add("kind", this.kind);
+ b.add("diagnostics", this.diagnostics);
+ b.add("isPreferred", this.isPreferred);
+ b.add("disabled", this.disabled);
+ b.add("edit", this.edit);
+ b.add("command", this.command);
+ b.add("data", this.data);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CodeAction other = (CodeAction) obj;
+ if (this.title == null) {
+ if (other.title != null)
+ return false;
+ } else if (!this.title.equals(other.title))
+ return false;
+ if (this.kind == null) {
+ if (other.kind != null)
+ return false;
+ } else if (!this.kind.equals(other.kind))
+ return false;
+ if (this.diagnostics == null) {
+ if (other.diagnostics != null)
+ return false;
+ } else if (!this.diagnostics.equals(other.diagnostics))
+ return false;
+ if (this.isPreferred == null) {
+ if (other.isPreferred != null)
+ return false;
+ } else if (!this.isPreferred.equals(other.isPreferred))
+ return false;
+ if (this.disabled == null) {
+ if (other.disabled != null)
+ return false;
+ } else if (!this.disabled.equals(other.disabled))
+ return false;
+ if (this.edit == null) {
+ if (other.edit != null)
+ return false;
+ } else if (!this.edit.equals(other.edit))
+ return false;
+ if (this.command == null) {
+ if (other.command != null)
+ return false;
+ } else if (!this.command.equals(other.command))
+ return false;
+ if (this.data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!this.data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.title== null) ? 0 : this.title.hashCode());
+ result = prime * result + ((this.kind== null) ? 0 : this.kind.hashCode());
+ result = prime * result + ((this.diagnostics== null) ? 0 : this.diagnostics.hashCode());
+ result = prime * result + ((this.isPreferred== null) ? 0 : this.isPreferred.hashCode());
+ result = prime * result + ((this.disabled== null) ? 0 : this.disabled.hashCode());
+ result = prime * result + ((this.edit== null) ? 0 : this.edit.hashCode());
+ result = prime * result + ((this.command== null) ? 0 : this.command.hashCode());
+ return prime * result + ((this.data== null) ? 0 : this.data.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeActionCapabilities.java b/java/org/eclipse/lsp4j/CodeActionCapabilities.java
new file mode 100644
index 0000000..e0ecbed
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeActionCapabilities.java
@@ -0,0 +1,287 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.CodeActionLiteralSupportCapabilities;
+import org.eclipse.lsp4j.CodeActionResolveSupportCapabilities;
+import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Capabilities specific to the `textDocument/codeAction`
+ */
+@SuppressWarnings("all")
+public class CodeActionCapabilities extends DynamicRegistrationCapabilities {
+ /**
+ * The client support code action literals as a valid
+ * response of the `textDocument/codeAction` request.
+ */
+ private CodeActionLiteralSupportCapabilities codeActionLiteralSupport;
+
+ /**
+ * Whether code action supports the {@link CodeAction#isPreferred} property.
+ * <p>
+ * Since 3.15.0
+ */
+ private Boolean isPreferredSupport;
+
+ /**
+ * Whether code action supports the {@link CodeAction#disabled} property.
+ * <p>
+ * Since 3.16.0
+ */
+ private Boolean disabledSupport;
+
+ /**
+ * Whether code action supports the {@link CodeAction#data} property which is
+ * preserved between a `textDocument/codeAction` and a
+ * `codeAction/resolve` request.
+ * <p>
+ * Since 3.16.0
+ */
+ private Boolean dataSupport;
+
+ /**
+ * Whether the client supports resolving additional code action
+ * properties via a separate `codeAction/resolve` request.
+ * <p>
+ * Since 3.16.0
+ */
+ private CodeActionResolveSupportCapabilities resolveSupport;
+
+ /**
+ * Whether the client honors the change annotations in
+ * text edits and resource operations returned via the
+ * {@link CodeAction#edit} property by for example presenting
+ * the workspace edit in the user interface and asking
+ * for confirmation.
+ * <p>
+ * Since 3.16.0
+ */
+ private Boolean honorsChangeAnnotations;
+
+ public CodeActionCapabilities() {
+ }
+
+ public CodeActionCapabilities(final Boolean dynamicRegistration) {
+ super(dynamicRegistration);
+ }
+
+ public CodeActionCapabilities(final CodeActionLiteralSupportCapabilities codeActionLiteralSupport, final Boolean dynamicRegistration) {
+ super(dynamicRegistration);
+ this.codeActionLiteralSupport = codeActionLiteralSupport;
+ }
+
+ public CodeActionCapabilities(final CodeActionLiteralSupportCapabilities codeActionLiteralSupport, final Boolean dynamicRegistration, final Boolean isPreferredSupport) {
+ this(codeActionLiteralSupport, dynamicRegistration);
+ this.isPreferredSupport = isPreferredSupport;
+ }
+
+ /**
+ * The client support code action literals as a valid
+ * response of the `textDocument/codeAction` request.
+ */
+ @Pure
+ public CodeActionLiteralSupportCapabilities getCodeActionLiteralSupport() {
+ return this.codeActionLiteralSupport;
+ }
+
+ /**
+ * The client support code action literals as a valid
+ * response of the `textDocument/codeAction` request.
+ */
+ public void setCodeActionLiteralSupport(final CodeActionLiteralSupportCapabilities codeActionLiteralSupport) {
+ this.codeActionLiteralSupport = codeActionLiteralSupport;
+ }
+
+ /**
+ * Whether code action supports the {@link CodeAction#isPreferred} property.
+ * <p>
+ * Since 3.15.0
+ */
+ @Pure
+ public Boolean getIsPreferredSupport() {
+ return this.isPreferredSupport;
+ }
+
+ /**
+ * Whether code action supports the {@link CodeAction#isPreferred} property.
+ * <p>
+ * Since 3.15.0
+ */
+ public void setIsPreferredSupport(final Boolean isPreferredSupport) {
+ this.isPreferredSupport = isPreferredSupport;
+ }
+
+ /**
+ * Whether code action supports the {@link CodeAction#disabled} property.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public Boolean getDisabledSupport() {
+ return this.disabledSupport;
+ }
+
+ /**
+ * Whether code action supports the {@link CodeAction#disabled} property.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setDisabledSupport(final Boolean disabledSupport) {
+ this.disabledSupport = disabledSupport;
+ }
+
+ /**
+ * Whether code action supports the {@link CodeAction#data} property which is
+ * preserved between a `textDocument/codeAction` and a
+ * `codeAction/resolve` request.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public Boolean getDataSupport() {
+ return this.dataSupport;
+ }
+
+ /**
+ * Whether code action supports the {@link CodeAction#data} property which is
+ * preserved between a `textDocument/codeAction` and a
+ * `codeAction/resolve` request.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setDataSupport(final Boolean dataSupport) {
+ this.dataSupport = dataSupport;
+ }
+
+ /**
+ * Whether the client supports resolving additional code action
+ * properties via a separate `codeAction/resolve` request.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public CodeActionResolveSupportCapabilities getResolveSupport() {
+ return this.resolveSupport;
+ }
+
+ /**
+ * Whether the client supports resolving additional code action
+ * properties via a separate `codeAction/resolve` request.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setResolveSupport(final CodeActionResolveSupportCapabilities resolveSupport) {
+ this.resolveSupport = resolveSupport;
+ }
+
+ /**
+ * Whether the client honors the change annotations in
+ * text edits and resource operations returned via the
+ * {@link CodeAction#edit} property by for example presenting
+ * the workspace edit in the user interface and asking
+ * for confirmation.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public Boolean getHonorsChangeAnnotations() {
+ return this.honorsChangeAnnotations;
+ }
+
+ /**
+ * Whether the client honors the change annotations in
+ * text edits and resource operations returned via the
+ * {@link CodeAction#edit} property by for example presenting
+ * the workspace edit in the user interface and asking
+ * for confirmation.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setHonorsChangeAnnotations(final Boolean honorsChangeAnnotations) {
+ this.honorsChangeAnnotations = honorsChangeAnnotations;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("codeActionLiteralSupport", this.codeActionLiteralSupport);
+ b.add("isPreferredSupport", this.isPreferredSupport);
+ b.add("disabledSupport", this.disabledSupport);
+ b.add("dataSupport", this.dataSupport);
+ b.add("resolveSupport", this.resolveSupport);
+ b.add("honorsChangeAnnotations", this.honorsChangeAnnotations);
+ b.add("dynamicRegistration", getDynamicRegistration());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CodeActionCapabilities other = (CodeActionCapabilities) obj;
+ if (this.codeActionLiteralSupport == null) {
+ if (other.codeActionLiteralSupport != null)
+ return false;
+ } else if (!this.codeActionLiteralSupport.equals(other.codeActionLiteralSupport))
+ return false;
+ if (this.isPreferredSupport == null) {
+ if (other.isPreferredSupport != null)
+ return false;
+ } else if (!this.isPreferredSupport.equals(other.isPreferredSupport))
+ return false;
+ if (this.disabledSupport == null) {
+ if (other.disabledSupport != null)
+ return false;
+ } else if (!this.disabledSupport.equals(other.disabledSupport))
+ return false;
+ if (this.dataSupport == null) {
+ if (other.dataSupport != null)
+ return false;
+ } else if (!this.dataSupport.equals(other.dataSupport))
+ return false;
+ if (this.resolveSupport == null) {
+ if (other.resolveSupport != null)
+ return false;
+ } else if (!this.resolveSupport.equals(other.resolveSupport))
+ return false;
+ if (this.honorsChangeAnnotations == null) {
+ if (other.honorsChangeAnnotations != null)
+ return false;
+ } else if (!this.honorsChangeAnnotations.equals(other.honorsChangeAnnotations))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((this.codeActionLiteralSupport== null) ? 0 : this.codeActionLiteralSupport.hashCode());
+ result = prime * result + ((this.isPreferredSupport== null) ? 0 : this.isPreferredSupport.hashCode());
+ result = prime * result + ((this.disabledSupport== null) ? 0 : this.disabledSupport.hashCode());
+ result = prime * result + ((this.dataSupport== null) ? 0 : this.dataSupport.hashCode());
+ result = prime * result + ((this.resolveSupport== null) ? 0 : this.resolveSupport.hashCode());
+ return prime * result + ((this.honorsChangeAnnotations== null) ? 0 : this.honorsChangeAnnotations.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeActionContext.java b/java/org/eclipse/lsp4j/CodeActionContext.java
new file mode 100644
index 0000000..ad4425d
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeActionContext.java
@@ -0,0 +1,135 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.Diagnostic;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Contains additional diagnostic information about the context in which a code action is run.
+ */
+@SuppressWarnings("all")
+public class CodeActionContext {
+ /**
+ * An array of diagnostics.
+ */
+ @NonNull
+ private List<Diagnostic> diagnostics;
+
+ /**
+ * Requested kind of actions to return.
+ * <p>
+ * Actions not of this kind are filtered out by the client before being shown. So servers
+ * can omit computing them.
+ * <p>
+ * See {@link CodeActionKind} for allowed values.
+ */
+ private List<String> only;
+
+ public CodeActionContext() {
+ }
+
+ public CodeActionContext(@NonNull final List<Diagnostic> diagnostics) {
+ this.diagnostics = Preconditions.<List<Diagnostic>>checkNotNull(diagnostics, "diagnostics");
+ }
+
+ public CodeActionContext(@NonNull final List<Diagnostic> diagnostics, final List<String> only) {
+ this(diagnostics);
+ this.only = only;
+ }
+
+ /**
+ * An array of diagnostics.
+ */
+ @Pure
+ @NonNull
+ public List<Diagnostic> getDiagnostics() {
+ return this.diagnostics;
+ }
+
+ /**
+ * An array of diagnostics.
+ */
+ public void setDiagnostics(@NonNull final List<Diagnostic> diagnostics) {
+ this.diagnostics = Preconditions.checkNotNull(diagnostics, "diagnostics");
+ }
+
+ /**
+ * Requested kind of actions to return.
+ * <p>
+ * Actions not of this kind are filtered out by the client before being shown. So servers
+ * can omit computing them.
+ * <p>
+ * See {@link CodeActionKind} for allowed values.
+ */
+ @Pure
+ public List<String> getOnly() {
+ return this.only;
+ }
+
+ /**
+ * Requested kind of actions to return.
+ * <p>
+ * Actions not of this kind are filtered out by the client before being shown. So servers
+ * can omit computing them.
+ * <p>
+ * See {@link CodeActionKind} for allowed values.
+ */
+ public void setOnly(final List<String> only) {
+ this.only = only;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("diagnostics", this.diagnostics);
+ b.add("only", this.only);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CodeActionContext other = (CodeActionContext) obj;
+ if (this.diagnostics == null) {
+ if (other.diagnostics != null)
+ return false;
+ } else if (!this.diagnostics.equals(other.diagnostics))
+ return false;
+ if (this.only == null) {
+ if (other.only != null)
+ return false;
+ } else if (!this.only.equals(other.only))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.diagnostics== null) ? 0 : this.diagnostics.hashCode());
+ return prime * result + ((this.only== null) ? 0 : this.only.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeActionDisabled.java b/java/org/eclipse/lsp4j/CodeActionDisabled.java
new file mode 100644
index 0000000..abbc341
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeActionDisabled.java
@@ -0,0 +1,102 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Marks that the code action cannot currently be applied.
+ * <p>
+ * Clients should follow the following guidelines regarding disabled code actions:
+ * <ul>
+ * <li>Disabled code actions are not shown in automatic <a href="https://code.visualstudio.com/docs/editor/editingevolved#_code-action">lightbulb</a>
+ * code action menu.
+ * <li>Disabled actions are shown as faded out in the code action menu when the user request a more specific type
+ * of code action, such as refactorings.
+ * <li>If the user has a <a href="https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions">keybinding</a>
+ * that auto applies a code action and only a disabled code actions are returned, the client should show the user an
+ * error message with {@link #reason} in the editor.
+ * </ul><p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CodeActionDisabled {
+ /**
+ * Human readable description of why the code action is currently disabled.
+ * <p>
+ * This is displayed in the code actions UI.
+ */
+ @NonNull
+ private String reason;
+
+ public CodeActionDisabled() {
+ }
+
+ public CodeActionDisabled(@NonNull final String reason) {
+ this.reason = Preconditions.<String>checkNotNull(reason, "reason");
+ }
+
+ /**
+ * Human readable description of why the code action is currently disabled.
+ * <p>
+ * This is displayed in the code actions UI.
+ */
+ @Pure
+ @NonNull
+ public String getReason() {
+ return this.reason;
+ }
+
+ /**
+ * Human readable description of why the code action is currently disabled.
+ * <p>
+ * This is displayed in the code actions UI.
+ */
+ public void setReason(@NonNull final String reason) {
+ this.reason = Preconditions.checkNotNull(reason, "reason");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("reason", this.reason);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CodeActionDisabled other = (CodeActionDisabled) obj;
+ if (this.reason == null) {
+ if (other.reason != null)
+ return false;
+ } else if (!this.reason.equals(other.reason))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.reason== null) ? 0 : this.reason.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeActionKind.java b/java/org/eclipse/lsp4j/CodeActionKind.java
new file mode 100644
index 0000000..d672fd7
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeActionKind.java
@@ -0,0 +1,80 @@
+/******************************************************************************
+ * Copyright (c) 2018 Microsoft Corporation and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ ******************************************************************************/
+package org.eclipse.lsp4j;
+
+/**
+ * The kind of a code action.
+ *
+ * Kinds are a hierarchical list of identifiers separated by `.`, e.g.
+ * `"refactor.extract.function"`.
+ *
+ * The set of kinds is open and client needs to announce the kinds it supports
+ * to the server during initialization.
+ */
+
+public final class CodeActionKind {
+
+ private CodeActionKind() {
+ }
+
+ /**
+ * Base kind for quickfix actions: 'quickfix'
+ */
+ public static final String QuickFix = "quickfix";
+
+ /**
+ * Base kind for refactoring actions: 'refactor'
+ */
+ public static final String Refactor = "refactor";
+
+ /**
+ * Base kind for refactoring extraction actions: 'refactor.extract'
+ *
+ * Example extract actions:
+ *
+ * - Extract method - Extract function - Extract variable - Extract interface
+ * from class - ...
+ */
+ public static final String RefactorExtract = "refactor.extract";
+
+ /**
+ * Base kind for refactoring inline actions: 'refactor.inline'
+ *
+ * Example inline actions:
+ *
+ * - Inline function - Inline variable - Inline constant - ...
+ */
+ public static final String RefactorInline = "refactor.inline";
+
+ /**
+ * Base kind for refactoring rewrite actions: 'refactor.rewrite'
+ *
+ * Example rewrite actions:
+ *
+ * - Convert JavaScript function to class - Add or remove parameter -
+ * Encapsulate field - Make method static - Move method to base class - ...
+ */
+ public static final String RefactorRewrite = "refactor.rewrite";
+
+ /**
+ * Base kind for source actions: `source`
+ *
+ * Source code actions apply to the entire file.
+ */
+ public static final String Source = "source";
+
+ /**
+ * Base kind for an organize imports source action: `source.organizeImports`
+ */
+ public static final String SourceOrganizeImports = "source.organizeImports";
+}
+
diff --git a/java/org/eclipse/lsp4j/CodeActionKindCapabilities.java b/java/org/eclipse/lsp4j/CodeActionKindCapabilities.java
new file mode 100644
index 0000000..27ea9d7
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeActionKindCapabilities.java
@@ -0,0 +1,100 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class CodeActionKindCapabilities {
+ /**
+ * The code action kind values the client supports. When this
+ * property exists the client also guarantees that it will
+ * handle values outside its set gracefully and falls back
+ * to a default value when unknown.
+ * <p>
+ * See {@link CodeActionKind} for allowed values.
+ */
+ @NonNull
+ private List<String> valueSet;
+
+ public CodeActionKindCapabilities() {
+ ArrayList<String> _arrayList = new ArrayList<String>();
+ this.valueSet = _arrayList;
+ }
+
+ public CodeActionKindCapabilities(@NonNull final List<String> valueSet) {
+ this.valueSet = Preconditions.<List<String>>checkNotNull(valueSet, "valueSet");
+ }
+
+ /**
+ * The code action kind values the client supports. When this
+ * property exists the client also guarantees that it will
+ * handle values outside its set gracefully and falls back
+ * to a default value when unknown.
+ * <p>
+ * See {@link CodeActionKind} for allowed values.
+ */
+ @Pure
+ @NonNull
+ public List<String> getValueSet() {
+ return this.valueSet;
+ }
+
+ /**
+ * The code action kind values the client supports. When this
+ * property exists the client also guarantees that it will
+ * handle values outside its set gracefully and falls back
+ * to a default value when unknown.
+ * <p>
+ * See {@link CodeActionKind} for allowed values.
+ */
+ public void setValueSet(@NonNull final List<String> valueSet) {
+ this.valueSet = Preconditions.checkNotNull(valueSet, "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;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CodeActionKindCapabilities other = (CodeActionKindCapabilities) obj;
+ if (this.valueSet == null) {
+ if (other.valueSet != null)
+ return false;
+ } else if (!this.valueSet.equals(other.valueSet))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.valueSet== null) ? 0 : this.valueSet.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeActionLiteralSupportCapabilities.java b/java/org/eclipse/lsp4j/CodeActionLiteralSupportCapabilities.java
new file mode 100644
index 0000000..d75b47d
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeActionLiteralSupportCapabilities.java
@@ -0,0 +1,81 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.CodeActionKindCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class CodeActionLiteralSupportCapabilities {
+ /**
+ * The code action kind is support with the following value
+ * set.
+ */
+ private CodeActionKindCapabilities codeActionKind;
+
+ public CodeActionLiteralSupportCapabilities() {
+ }
+
+ public CodeActionLiteralSupportCapabilities(final CodeActionKindCapabilities codeActionKind) {
+ this.codeActionKind = codeActionKind;
+ }
+
+ /**
+ * The code action kind is support with the following value
+ * set.
+ */
+ @Pure
+ public CodeActionKindCapabilities getCodeActionKind() {
+ return this.codeActionKind;
+ }
+
+ /**
+ * The code action kind is support with the following value
+ * set.
+ */
+ public void setCodeActionKind(final CodeActionKindCapabilities codeActionKind) {
+ this.codeActionKind = codeActionKind;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("codeActionKind", this.codeActionKind);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CodeActionLiteralSupportCapabilities other = (CodeActionLiteralSupportCapabilities) obj;
+ if (this.codeActionKind == null) {
+ if (other.codeActionKind != null)
+ return false;
+ } else if (!this.codeActionKind.equals(other.codeActionKind))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.codeActionKind== null) ? 0 : this.codeActionKind.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeActionOptions.java b/java/org/eclipse/lsp4j/CodeActionOptions.java
new file mode 100644
index 0000000..c4ba37f
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeActionOptions.java
@@ -0,0 +1,132 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.AbstractWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Code Action options.
+ */
+@SuppressWarnings("all")
+public class CodeActionOptions extends AbstractWorkDoneProgressOptions {
+ /**
+ * CodeActionKinds that this server may return.
+ * <p>
+ * The list of kinds may be generic, such as {@link CodeActionKind#Refactor}, or the server
+ * may list out every specific kind they provide.
+ */
+ private List<String> codeActionKinds;
+
+ /**
+ * The server provides support to resolve additional
+ * information for a code action.
+ * <p>
+ * Since 3.16.0
+ */
+ private Boolean resolveProvider;
+
+ public CodeActionOptions() {
+ }
+
+ public CodeActionOptions(final List<String> codeActionKinds) {
+ this.codeActionKinds = codeActionKinds;
+ }
+
+ /**
+ * CodeActionKinds that this server may return.
+ * <p>
+ * The list of kinds may be generic, such as {@link CodeActionKind#Refactor}, or the server
+ * may list out every specific kind they provide.
+ */
+ @Pure
+ public List<String> getCodeActionKinds() {
+ return this.codeActionKinds;
+ }
+
+ /**
+ * CodeActionKinds that this server may return.
+ * <p>
+ * The list of kinds may be generic, such as {@link CodeActionKind#Refactor}, or the server
+ * may list out every specific kind they provide.
+ */
+ public void setCodeActionKinds(final List<String> codeActionKinds) {
+ this.codeActionKinds = codeActionKinds;
+ }
+
+ /**
+ * The server provides support to resolve additional
+ * information for a code action.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public Boolean getResolveProvider() {
+ return this.resolveProvider;
+ }
+
+ /**
+ * The server provides support to resolve additional
+ * information for a code action.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setResolveProvider(final Boolean resolveProvider) {
+ this.resolveProvider = resolveProvider;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("codeActionKinds", this.codeActionKinds);
+ b.add("resolveProvider", this.resolveProvider);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CodeActionOptions other = (CodeActionOptions) obj;
+ if (this.codeActionKinds == null) {
+ if (other.codeActionKinds != null)
+ return false;
+ } else if (!this.codeActionKinds.equals(other.codeActionKinds))
+ return false;
+ if (this.resolveProvider == null) {
+ if (other.resolveProvider != null)
+ return false;
+ } else if (!this.resolveProvider.equals(other.resolveProvider))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((this.codeActionKinds== null) ? 0 : this.codeActionKinds.hashCode());
+ return prime * result + ((this.resolveProvider== null) ? 0 : this.resolveProvider.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeActionParams.java b/java/org/eclipse/lsp4j/CodeActionParams.java
new file mode 100644
index 0000000..5f94688
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeActionParams.java
@@ -0,0 +1,155 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.CodeActionContext;
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.WorkDoneProgressAndPartialResultParams;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The code action request is sent from the client to the server to compute commands for a given text document and range.
+ * These commands are typically code fixes to either fix problems or to beautify/refactor code.
+ */
+@SuppressWarnings("all")
+public class CodeActionParams extends WorkDoneProgressAndPartialResultParams {
+ /**
+ * The document in which the command was invoked.
+ */
+ @NonNull
+ private TextDocumentIdentifier textDocument;
+
+ /**
+ * The range for which the command was invoked.
+ */
+ @NonNull
+ private Range range;
+
+ /**
+ * Context carrying additional information.
+ */
+ @NonNull
+ private CodeActionContext context;
+
+ public CodeActionParams() {
+ }
+
+ public CodeActionParams(@NonNull final TextDocumentIdentifier textDocument, @NonNull final Range range, @NonNull final CodeActionContext context) {
+ this.textDocument = Preconditions.<TextDocumentIdentifier>checkNotNull(textDocument, "textDocument");
+ this.range = Preconditions.<Range>checkNotNull(range, "range");
+ this.context = Preconditions.<CodeActionContext>checkNotNull(context, "context");
+ }
+
+ /**
+ * The document in which the command was invoked.
+ */
+ @Pure
+ @NonNull
+ public TextDocumentIdentifier getTextDocument() {
+ return this.textDocument;
+ }
+
+ /**
+ * The document in which the command was invoked.
+ */
+ public void setTextDocument(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.checkNotNull(textDocument, "textDocument");
+ }
+
+ /**
+ * The range for which the command was invoked.
+ */
+ @Pure
+ @NonNull
+ public Range getRange() {
+ return this.range;
+ }
+
+ /**
+ * The range for which the command was invoked.
+ */
+ public void setRange(@NonNull final Range range) {
+ this.range = Preconditions.checkNotNull(range, "range");
+ }
+
+ /**
+ * Context carrying additional information.
+ */
+ @Pure
+ @NonNull
+ public CodeActionContext getContext() {
+ return this.context;
+ }
+
+ /**
+ * Context carrying additional information.
+ */
+ public void setContext(@NonNull final CodeActionContext context) {
+ this.context = Preconditions.checkNotNull(context, "context");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("textDocument", this.textDocument);
+ b.add("range", this.range);
+ b.add("context", this.context);
+ b.add("workDoneToken", getWorkDoneToken());
+ b.add("partialResultToken", getPartialResultToken());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CodeActionParams other = (CodeActionParams) obj;
+ if (this.textDocument == null) {
+ if (other.textDocument != null)
+ return false;
+ } else if (!this.textDocument.equals(other.textDocument))
+ return false;
+ if (this.range == null) {
+ if (other.range != null)
+ return false;
+ } else if (!this.range.equals(other.range))
+ return false;
+ if (this.context == null) {
+ if (other.context != null)
+ return false;
+ } else if (!this.context.equals(other.context))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());
+ result = prime * result + ((this.range== null) ? 0 : this.range.hashCode());
+ return prime * result + ((this.context== null) ? 0 : this.context.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeActionRegistrationOptions.java b/java/org/eclipse/lsp4j/CodeActionRegistrationOptions.java
new file mode 100644
index 0000000..c7c5a95
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeActionRegistrationOptions.java
@@ -0,0 +1,133 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.AbstractTextDocumentRegistrationAndWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Code Action registration options.
+ */
+@SuppressWarnings("all")
+public class CodeActionRegistrationOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions {
+ /**
+ * CodeActionKinds that this server may return.
+ * <p>
+ * The list of kinds may be generic, such as {@link CodeActionKind#Refactor}, or the server
+ * may list out every specific kind they provide.
+ */
+ private List<String> codeActionKinds;
+
+ /**
+ * The server provides support to resolve additional
+ * information for a code action.
+ * <p>
+ * Since 3.16.0
+ */
+ private Boolean resolveProvider;
+
+ public CodeActionRegistrationOptions() {
+ }
+
+ public CodeActionRegistrationOptions(final List<String> codeActionKinds) {
+ this.codeActionKinds = codeActionKinds;
+ }
+
+ /**
+ * CodeActionKinds that this server may return.
+ * <p>
+ * The list of kinds may be generic, such as {@link CodeActionKind#Refactor}, or the server
+ * may list out every specific kind they provide.
+ */
+ @Pure
+ public List<String> getCodeActionKinds() {
+ return this.codeActionKinds;
+ }
+
+ /**
+ * CodeActionKinds that this server may return.
+ * <p>
+ * The list of kinds may be generic, such as {@link CodeActionKind#Refactor}, or the server
+ * may list out every specific kind they provide.
+ */
+ public void setCodeActionKinds(final List<String> codeActionKinds) {
+ this.codeActionKinds = codeActionKinds;
+ }
+
+ /**
+ * The server provides support to resolve additional
+ * information for a code action.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public Boolean getResolveProvider() {
+ return this.resolveProvider;
+ }
+
+ /**
+ * The server provides support to resolve additional
+ * information for a code action.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setResolveProvider(final Boolean resolveProvider) {
+ this.resolveProvider = resolveProvider;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("codeActionKinds", this.codeActionKinds);
+ b.add("resolveProvider", this.resolveProvider);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ b.add("documentSelector", getDocumentSelector());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CodeActionRegistrationOptions other = (CodeActionRegistrationOptions) obj;
+ if (this.codeActionKinds == null) {
+ if (other.codeActionKinds != null)
+ return false;
+ } else if (!this.codeActionKinds.equals(other.codeActionKinds))
+ return false;
+ if (this.resolveProvider == null) {
+ if (other.resolveProvider != null)
+ return false;
+ } else if (!this.resolveProvider.equals(other.resolveProvider))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((this.codeActionKinds== null) ? 0 : this.codeActionKinds.hashCode());
+ return prime * result + ((this.resolveProvider== null) ? 0 : this.resolveProvider.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeActionResolveSupportCapabilities.java b/java/org/eclipse/lsp4j/CodeActionResolveSupportCapabilities.java
new file mode 100644
index 0000000..0a57d39
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeActionResolveSupportCapabilities.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Whether the client supports resolving additional code action
+ * properties via a separate `codeAction/resolve` request.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CodeActionResolveSupportCapabilities {
+ /**
+ * The properties that a client can resolve lazily.
+ */
+ @NonNull
+ private List<String> properties;
+
+ public CodeActionResolveSupportCapabilities() {
+ ArrayList<String> _arrayList = new ArrayList<String>();
+ this.properties = _arrayList;
+ }
+
+ public CodeActionResolveSupportCapabilities(@NonNull final List<String> properties) {
+ this.properties = Preconditions.<List<String>>checkNotNull(properties, "properties");
+ }
+
+ /**
+ * The properties that a client can resolve lazily.
+ */
+ @Pure
+ @NonNull
+ public List<String> getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * The properties that a client can resolve lazily.
+ */
+ public void setProperties(@NonNull final List<String> properties) {
+ this.properties = Preconditions.checkNotNull(properties, "properties");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("properties", this.properties);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CodeActionResolveSupportCapabilities other = (CodeActionResolveSupportCapabilities) obj;
+ if (this.properties == null) {
+ if (other.properties != null)
+ return false;
+ } else if (!this.properties.equals(other.properties))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.properties== null) ? 0 : this.properties.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeLens.java b/java/org/eclipse/lsp4j/CodeLens.java
new file mode 100644
index 0000000..68ef8ae
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeLens.java
@@ -0,0 +1,155 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import com.google.gson.annotations.JsonAdapter;
+import org.eclipse.lsp4j.Command;
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.jsonrpc.json.adapters.JsonElementTypeAdapter;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * A code lens represents a command that should be shown along with source text, like the number of references,
+ * a way to run tests, etc.
+ * <p>
+ * A code lens is <em>unresolved</em> when no command is associated to it. For performance reasons the creation of a
+ * code lens and resolving should be done to two stages.
+ */
+@SuppressWarnings("all")
+public class CodeLens {
+ /**
+ * The range in which this code lens is valid. Should only span a single line.
+ */
+ @NonNull
+ private Range range;
+
+ /**
+ * The command this code lens represents.
+ */
+ private Command command;
+
+ /**
+ * A data entry field that is preserved on a code lens item between a code lens and a code lens resolve request.
+ */
+ @JsonAdapter(JsonElementTypeAdapter.Factory.class)
+ private Object data;
+
+ public CodeLens() {
+ }
+
+ public CodeLens(@NonNull final Range range) {
+ this.range = Preconditions.<Range>checkNotNull(range, "range");
+ }
+
+ public CodeLens(@NonNull final Range range, final Command command, final Object data) {
+ this(range);
+ this.command = command;
+ this.data = data;
+ }
+
+ /**
+ * The range in which this code lens is valid. Should only span a single line.
+ */
+ @Pure
+ @NonNull
+ public Range getRange() {
+ return this.range;
+ }
+
+ /**
+ * The range in which this code lens is valid. Should only span a single line.
+ */
+ public void setRange(@NonNull final Range range) {
+ this.range = Preconditions.checkNotNull(range, "range");
+ }
+
+ /**
+ * The command this code lens represents.
+ */
+ @Pure
+ public Command getCommand() {
+ return this.command;
+ }
+
+ /**
+ * The command this code lens represents.
+ */
+ public void setCommand(final Command command) {
+ this.command = command;
+ }
+
+ /**
+ * A data entry field that is preserved on a code lens item between a code lens and a code lens resolve request.
+ */
+ @Pure
+ public Object getData() {
+ return this.data;
+ }
+
+ /**
+ * A data entry field that is preserved on a code lens item between a code lens and a code lens resolve request.
+ */
+ public void setData(final Object data) {
+ this.data = data;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("range", this.range);
+ b.add("command", this.command);
+ b.add("data", this.data);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CodeLens other = (CodeLens) obj;
+ if (this.range == null) {
+ if (other.range != null)
+ return false;
+ } else if (!this.range.equals(other.range))
+ return false;
+ if (this.command == null) {
+ if (other.command != null)
+ return false;
+ } else if (!this.command.equals(other.command))
+ return false;
+ if (this.data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!this.data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.range== null) ? 0 : this.range.hashCode());
+ result = prime * result + ((this.command== null) ? 0 : this.command.hashCode());
+ return prime * result + ((this.data== null) ? 0 : this.data.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeLensCapabilities.java b/java/org/eclipse/lsp4j/CodeLensCapabilities.java
new file mode 100644
index 0000000..6b30772
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeLensCapabilities.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Capabilities specific to the `textDocument/codeLens`
+ */
+@SuppressWarnings("all")
+public class CodeLensCapabilities extends DynamicRegistrationCapabilities {
+ public CodeLensCapabilities() {
+ }
+
+ public CodeLensCapabilities(final Boolean dynamicRegistration) {
+ super(dynamicRegistration);
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("dynamicRegistration", getDynamicRegistration());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeLensOptions.java b/java/org/eclipse/lsp4j/CodeLensOptions.java
new file mode 100644
index 0000000..d951863
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeLensOptions.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Code Lens options.
+ */
+@SuppressWarnings("all")
+public class CodeLensOptions extends AbstractWorkDoneProgressOptions {
+ /**
+ * Code lens has a resolve provider as well.
+ */
+ private Boolean resolveProvider;
+
+ public CodeLensOptions() {
+ }
+
+ public CodeLensOptions(final Boolean resolveProvider) {
+ this.resolveProvider = resolveProvider;
+ }
+
+ /**
+ * Code lens has a resolve provider as well.
+ */
+ @Pure
+ public Boolean getResolveProvider() {
+ return this.resolveProvider;
+ }
+
+ /**
+ * Code lens has a resolve provider as well.
+ */
+ public void setResolveProvider(final Boolean resolveProvider) {
+ this.resolveProvider = resolveProvider;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("resolveProvider", this.resolveProvider);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CodeLensOptions other = (CodeLensOptions) obj;
+ if (this.resolveProvider == null) {
+ if (other.resolveProvider != null)
+ return false;
+ } else if (!this.resolveProvider.equals(other.resolveProvider))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.resolveProvider== null) ? 0 : this.resolveProvider.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeLensParams.java b/java/org/eclipse/lsp4j/CodeLensParams.java
new file mode 100644
index 0000000..3585bd7
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeLensParams.java
@@ -0,0 +1,90 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.WorkDoneProgressAndPartialResultParams;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The code lens request is sent from the client to the server to compute code lenses for a given text document.
+ */
+@SuppressWarnings("all")
+public class CodeLensParams extends WorkDoneProgressAndPartialResultParams {
+ /**
+ * The document to request code lens for.
+ */
+ @NonNull
+ private TextDocumentIdentifier textDocument;
+
+ public CodeLensParams() {
+ }
+
+ public CodeLensParams(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.<TextDocumentIdentifier>checkNotNull(textDocument, "textDocument");
+ }
+
+ /**
+ * The document to request code lens for.
+ */
+ @Pure
+ @NonNull
+ public TextDocumentIdentifier getTextDocument() {
+ return this.textDocument;
+ }
+
+ /**
+ * The document to request code lens for.
+ */
+ public void setTextDocument(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.checkNotNull(textDocument, "textDocument");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("textDocument", this.textDocument);
+ b.add("workDoneToken", getWorkDoneToken());
+ b.add("partialResultToken", getPartialResultToken());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CodeLensParams other = (CodeLensParams) obj;
+ if (this.textDocument == null) {
+ if (other.textDocument != null)
+ return false;
+ } else if (!this.textDocument.equals(other.textDocument))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeLensRegistrationOptions.java b/java/org/eclipse/lsp4j/CodeLensRegistrationOptions.java
new file mode 100644
index 0000000..96cc359
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeLensRegistrationOptions.java
@@ -0,0 +1,82 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractTextDocumentRegistrationAndWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class CodeLensRegistrationOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions {
+ /**
+ * Code lens has a resolve provider as well.
+ */
+ private Boolean resolveProvider;
+
+ public CodeLensRegistrationOptions() {
+ }
+
+ public CodeLensRegistrationOptions(final Boolean resolveProvider) {
+ this.resolveProvider = resolveProvider;
+ }
+
+ /**
+ * Code lens has a resolve provider as well.
+ */
+ @Pure
+ public Boolean getResolveProvider() {
+ return this.resolveProvider;
+ }
+
+ /**
+ * Code lens has a resolve provider as well.
+ */
+ public void setResolveProvider(final Boolean resolveProvider) {
+ this.resolveProvider = resolveProvider;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("resolveProvider", this.resolveProvider);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ b.add("documentSelector", getDocumentSelector());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CodeLensRegistrationOptions other = (CodeLensRegistrationOptions) obj;
+ if (this.resolveProvider == null) {
+ if (other.resolveProvider != null)
+ return false;
+ } else if (!this.resolveProvider.equals(other.resolveProvider))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.resolveProvider== null) ? 0 : this.resolveProvider.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CodeLensWorkspaceCapabilities.java b/java/org/eclipse/lsp4j/CodeLensWorkspaceCapabilities.java
new file mode 100644
index 0000000..7353fc7
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CodeLensWorkspaceCapabilities.java
@@ -0,0 +1,101 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Capabilities specific to the code lens requests scoped to the
+ * workspace.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CodeLensWorkspaceCapabilities {
+ /**
+ * Whether the client implementation supports a refresh request sent from the
+ * server to the client.
+ * <p>
+ * Note that this event is global and will force the client to refresh all
+ * code lenses currently shown. It should be used with absolute care and is
+ * useful for situations where a server for example detects a project-wide
+ * change that requires such a calculation.
+ */
+ private Boolean refreshSupport;
+
+ public CodeLensWorkspaceCapabilities() {
+ }
+
+ public CodeLensWorkspaceCapabilities(final Boolean refreshSupport) {
+ this.refreshSupport = refreshSupport;
+ }
+
+ /**
+ * Whether the client implementation supports a refresh request sent from the
+ * server to the client.
+ * <p>
+ * Note that this event is global and will force the client to refresh all
+ * code lenses currently shown. It should be used with absolute care and is
+ * useful for situations where a server for example detects a project-wide
+ * change that requires such a calculation.
+ */
+ @Pure
+ public Boolean getRefreshSupport() {
+ return this.refreshSupport;
+ }
+
+ /**
+ * Whether the client implementation supports a refresh request sent from the
+ * server to the client.
+ * <p>
+ * Note that this event is global and will force the client to refresh all
+ * code lenses currently shown. It should be used with absolute care and is
+ * useful for situations where a server for example detects a project-wide
+ * change that requires such a calculation.
+ */
+ public void setRefreshSupport(final Boolean refreshSupport) {
+ this.refreshSupport = refreshSupport;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("refreshSupport", this.refreshSupport);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CodeLensWorkspaceCapabilities other = (CodeLensWorkspaceCapabilities) obj;
+ if (this.refreshSupport == null) {
+ if (other.refreshSupport != null)
+ return false;
+ } else if (!this.refreshSupport.equals(other.refreshSupport))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.refreshSupport== null) ? 0 : this.refreshSupport.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/Color.java b/java/org/eclipse/lsp4j/Color.java
new file mode 100644
index 0000000..5ad37f8
--- /dev/null
+++ b/java/org/eclipse/lsp4j/Color.java
@@ -0,0 +1,154 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Represents a color in RGBA space.
+ */
+@SuppressWarnings("all")
+public class Color {
+ /**
+ * The red component of this color in the range [0-1].
+ */
+ private double red;
+
+ /**
+ * The green component of this color in the range [0-1].
+ */
+ private double green;
+
+ /**
+ * The blue component of this color in the range [0-1].
+ */
+ private double blue;
+
+ /**
+ * The alpha component of this color in the range [0-1].
+ */
+ private double alpha;
+
+ public Color() {
+ }
+
+ public Color(final double red, final double green, final double blue, final double alpha) {
+ this.red = red;
+ this.green = green;
+ this.blue = blue;
+ this.alpha = alpha;
+ }
+
+ /**
+ * The red component of this color in the range [0-1].
+ */
+ @Pure
+ public double getRed() {
+ return this.red;
+ }
+
+ /**
+ * The red component of this color in the range [0-1].
+ */
+ public void setRed(final double red) {
+ this.red = red;
+ }
+
+ /**
+ * The green component of this color in the range [0-1].
+ */
+ @Pure
+ public double getGreen() {
+ return this.green;
+ }
+
+ /**
+ * The green component of this color in the range [0-1].
+ */
+ public void setGreen(final double green) {
+ this.green = green;
+ }
+
+ /**
+ * The blue component of this color in the range [0-1].
+ */
+ @Pure
+ public double getBlue() {
+ return this.blue;
+ }
+
+ /**
+ * The blue component of this color in the range [0-1].
+ */
+ public void setBlue(final double blue) {
+ this.blue = blue;
+ }
+
+ /**
+ * The alpha component of this color in the range [0-1].
+ */
+ @Pure
+ public double getAlpha() {
+ return this.alpha;
+ }
+
+ /**
+ * The alpha component of this color in the range [0-1].
+ */
+ public void setAlpha(final double alpha) {
+ this.alpha = alpha;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("red", this.red);
+ b.add("green", this.green);
+ b.add("blue", this.blue);
+ b.add("alpha", this.alpha);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Color other = (Color) obj;
+ if (Double.doubleToLongBits(other.red) != Double.doubleToLongBits(this.red))
+ return false;
+ if (Double.doubleToLongBits(other.green) != Double.doubleToLongBits(this.green))
+ return false;
+ if (Double.doubleToLongBits(other.blue) != Double.doubleToLongBits(this.blue))
+ return false;
+ if (Double.doubleToLongBits(other.alpha) != Double.doubleToLongBits(this.alpha))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (int) (Double.doubleToLongBits(this.red) ^ (Double.doubleToLongBits(this.red) >>> 32));
+ result = prime * result + (int) (Double.doubleToLongBits(this.green) ^ (Double.doubleToLongBits(this.green) >>> 32));
+ result = prime * result + (int) (Double.doubleToLongBits(this.blue) ^ (Double.doubleToLongBits(this.blue) >>> 32));
+ return prime * result + (int) (Double.doubleToLongBits(this.alpha) ^ (Double.doubleToLongBits(this.alpha) >>> 32));
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ColorInformation.java b/java/org/eclipse/lsp4j/ColorInformation.java
new file mode 100644
index 0000000..d5d742d
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ColorInformation.java
@@ -0,0 +1,115 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.Color;
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class ColorInformation {
+ /**
+ * The range in the document where this color appears.
+ */
+ @NonNull
+ private Range range;
+
+ /**
+ * The actual color value for this color range.
+ */
+ @NonNull
+ private Color color;
+
+ public ColorInformation() {
+ }
+
+ public ColorInformation(@NonNull final Range range, @NonNull final Color color) {
+ this.range = Preconditions.<Range>checkNotNull(range, "range");
+ this.color = Preconditions.<Color>checkNotNull(color, "color");
+ }
+
+ /**
+ * The range in the document where this color appears.
+ */
+ @Pure
+ @NonNull
+ public Range getRange() {
+ return this.range;
+ }
+
+ /**
+ * The range in the document where this color appears.
+ */
+ public void setRange(@NonNull final Range range) {
+ this.range = Preconditions.checkNotNull(range, "range");
+ }
+
+ /**
+ * The actual color value for this color range.
+ */
+ @Pure
+ @NonNull
+ public Color getColor() {
+ return this.color;
+ }
+
+ /**
+ * The actual color value for this color range.
+ */
+ public void setColor(@NonNull final Color color) {
+ this.color = Preconditions.checkNotNull(color, "color");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("range", this.range);
+ b.add("color", this.color);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ColorInformation other = (ColorInformation) obj;
+ if (this.range == null) {
+ if (other.range != null)
+ return false;
+ } else if (!this.range.equals(other.range))
+ return false;
+ if (this.color == null) {
+ if (other.color != null)
+ return false;
+ } else if (!this.color.equals(other.color))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.range== null) ? 0 : this.range.hashCode());
+ return prime * result + ((this.color== null) ? 0 : this.color.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ColorPresentation.java b/java/org/eclipse/lsp4j/ColorPresentation.java
new file mode 100644
index 0000000..6703a85
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ColorPresentation.java
@@ -0,0 +1,162 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.TextEdit;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class ColorPresentation {
+ /**
+ * The label of this color presentation. It will be shown on the color
+ * picker header. By default this is also the text that is inserted when selecting
+ * this color presentation.
+ */
+ @NonNull
+ private String label;
+
+ /**
+ * An edit which is applied to a document when selecting
+ * this presentation for the color. When `null` the label is used.
+ */
+ private TextEdit textEdit;
+
+ /**
+ * An optional array of additional text edits that are applied when
+ * selecting this color presentation. Edits must not overlap with the main edit nor with themselves.
+ */
+ private List<TextEdit> additionalTextEdits;
+
+ public ColorPresentation() {
+ }
+
+ public ColorPresentation(@NonNull final String label) {
+ this.label = Preconditions.<String>checkNotNull(label, "label");
+ }
+
+ public ColorPresentation(@NonNull final String label, final TextEdit textEdit) {
+ this(label);
+ this.textEdit = textEdit;
+ }
+
+ public ColorPresentation(@NonNull final String label, final TextEdit textEdit, final List<TextEdit> additionalTextEdits) {
+ this(label);
+ this.textEdit = textEdit;
+ this.additionalTextEdits = additionalTextEdits;
+ }
+
+ /**
+ * The label of this color presentation. It will be shown on the color
+ * picker header. By default this is also the text that is inserted when selecting
+ * this color presentation.
+ */
+ @Pure
+ @NonNull
+ public String getLabel() {
+ return this.label;
+ }
+
+ /**
+ * The label of this color presentation. It will be shown on the color
+ * picker header. By default this is also the text that is inserted when selecting
+ * this color presentation.
+ */
+ public void setLabel(@NonNull final String label) {
+ this.label = Preconditions.checkNotNull(label, "label");
+ }
+
+ /**
+ * An edit which is applied to a document when selecting
+ * this presentation for the color. When `null` the label is used.
+ */
+ @Pure
+ public TextEdit getTextEdit() {
+ return this.textEdit;
+ }
+
+ /**
+ * An edit which is applied to a document when selecting
+ * this presentation for the color. When `null` the label is used.
+ */
+ public void setTextEdit(final TextEdit textEdit) {
+ this.textEdit = textEdit;
+ }
+
+ /**
+ * An optional array of additional text edits that are applied when
+ * selecting this color presentation. Edits must not overlap with the main edit nor with themselves.
+ */
+ @Pure
+ public List<TextEdit> getAdditionalTextEdits() {
+ return this.additionalTextEdits;
+ }
+
+ /**
+ * An optional array of additional text edits that are applied when
+ * selecting this color presentation. Edits must not overlap with the main edit nor with themselves.
+ */
+ public void setAdditionalTextEdits(final List<TextEdit> additionalTextEdits) {
+ this.additionalTextEdits = additionalTextEdits;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("label", this.label);
+ b.add("textEdit", this.textEdit);
+ b.add("additionalTextEdits", this.additionalTextEdits);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ColorPresentation other = (ColorPresentation) obj;
+ if (this.label == null) {
+ if (other.label != null)
+ return false;
+ } else if (!this.label.equals(other.label))
+ return false;
+ if (this.textEdit == null) {
+ if (other.textEdit != null)
+ return false;
+ } else if (!this.textEdit.equals(other.textEdit))
+ return false;
+ if (this.additionalTextEdits == null) {
+ if (other.additionalTextEdits != null)
+ return false;
+ } else if (!this.additionalTextEdits.equals(other.additionalTextEdits))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.label== null) ? 0 : this.label.hashCode());
+ result = prime * result + ((this.textEdit== null) ? 0 : this.textEdit.hashCode());
+ return prime * result + ((this.additionalTextEdits== null) ? 0 : this.additionalTextEdits.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ColorPresentationParams.java b/java/org/eclipse/lsp4j/ColorPresentationParams.java
new file mode 100644
index 0000000..3e6f5b1
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ColorPresentationParams.java
@@ -0,0 +1,157 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.Color;
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.WorkDoneProgressAndPartialResultParams;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The color presentation request is sent from the client to the server to obtain a list of presentations
+ * for a color value at a given location.
+ * <p>
+ * Since 3.6.0
+ */
+@SuppressWarnings("all")
+public class ColorPresentationParams extends WorkDoneProgressAndPartialResultParams {
+ /**
+ * The text document.
+ */
+ @NonNull
+ private TextDocumentIdentifier textDocument;
+
+ /**
+ * The color information to request presentations for.
+ */
+ @NonNull
+ private Color color;
+
+ /**
+ * The range where the color would be inserted. Serves as a context.
+ */
+ @NonNull
+ private Range range;
+
+ public ColorPresentationParams() {
+ }
+
+ public ColorPresentationParams(@NonNull final TextDocumentIdentifier textDocument, @NonNull final Color color, @NonNull final Range range) {
+ this.textDocument = Preconditions.<TextDocumentIdentifier>checkNotNull(textDocument, "textDocument");
+ this.color = Preconditions.<Color>checkNotNull(color, "color");
+ this.range = Preconditions.<Range>checkNotNull(range, "range");
+ }
+
+ /**
+ * The text document.
+ */
+ @Pure
+ @NonNull
+ public TextDocumentIdentifier getTextDocument() {
+ return this.textDocument;
+ }
+
+ /**
+ * The text document.
+ */
+ public void setTextDocument(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.checkNotNull(textDocument, "textDocument");
+ }
+
+ /**
+ * The color information to request presentations for.
+ */
+ @Pure
+ @NonNull
+ public Color getColor() {
+ return this.color;
+ }
+
+ /**
+ * The color information to request presentations for.
+ */
+ public void setColor(@NonNull final Color color) {
+ this.color = Preconditions.checkNotNull(color, "color");
+ }
+
+ /**
+ * The range where the color would be inserted. Serves as a context.
+ */
+ @Pure
+ @NonNull
+ public Range getRange() {
+ return this.range;
+ }
+
+ /**
+ * The range where the color would be inserted. Serves as a context.
+ */
+ public void setRange(@NonNull final Range range) {
+ this.range = Preconditions.checkNotNull(range, "range");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("textDocument", this.textDocument);
+ b.add("color", this.color);
+ b.add("range", this.range);
+ b.add("workDoneToken", getWorkDoneToken());
+ b.add("partialResultToken", getPartialResultToken());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ ColorPresentationParams other = (ColorPresentationParams) obj;
+ if (this.textDocument == null) {
+ if (other.textDocument != null)
+ return false;
+ } else if (!this.textDocument.equals(other.textDocument))
+ return false;
+ if (this.color == null) {
+ if (other.color != null)
+ return false;
+ } else if (!this.color.equals(other.color))
+ return false;
+ if (this.range == null) {
+ if (other.range != null)
+ return false;
+ } else if (!this.range.equals(other.range))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());
+ result = prime * result + ((this.color== null) ? 0 : this.color.hashCode());
+ return prime * result + ((this.range== null) ? 0 : this.range.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ColorProviderCapabilities.java b/java/org/eclipse/lsp4j/ColorProviderCapabilities.java
new file mode 100644
index 0000000..9c9447f
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ColorProviderCapabilities.java
@@ -0,0 +1,60 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Capabilities specific to the `textDocument/documentColor` and the
+ * `textDocument/colorPresentation` request.
+ * <p>
+ * Since 3.6.0
+ */
+@SuppressWarnings("all")
+public class ColorProviderCapabilities extends DynamicRegistrationCapabilities {
+ public ColorProviderCapabilities() {
+ }
+
+ public ColorProviderCapabilities(final Boolean dynamicRegistration) {
+ super(dynamicRegistration);
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("dynamicRegistration", getDynamicRegistration());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ColorProviderOptions.java b/java/org/eclipse/lsp4j/ColorProviderOptions.java
new file mode 100644
index 0000000..642459c
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ColorProviderOptions.java
@@ -0,0 +1,88 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractTextDocumentRegistrationAndWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Document color options
+ */
+@SuppressWarnings("all")
+public class ColorProviderOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions {
+ /**
+ * The id used to register the request. The id can be used to deregister
+ * the request again. See also Registration#id.
+ */
+ private String id;
+
+ public ColorProviderOptions() {
+ }
+
+ public ColorProviderOptions(final String id) {
+ this.id = id;
+ }
+
+ /**
+ * The id used to register the request. The id can be used to deregister
+ * the request again. See also Registration#id.
+ */
+ @Pure
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * The id used to register the request. The id can be used to deregister
+ * the request again. See also Registration#id.
+ */
+ public void setId(final String id) {
+ this.id = id;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("id", this.id);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ b.add("documentSelector", getDocumentSelector());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ ColorProviderOptions other = (ColorProviderOptions) obj;
+ if (this.id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!this.id.equals(other.id))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.id== null) ? 0 : this.id.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/Command.java b/java/org/eclipse/lsp4j/Command.java
new file mode 100644
index 0000000..1a8bed0
--- /dev/null
+++ b/java/org/eclipse/lsp4j/Command.java
@@ -0,0 +1,150 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Represents a reference to a command. Provides a title which will be used to represent a command in the UI and,
+ * optionally, an array of arguments which will be passed to the command handler function when invoked.
+ */
+@SuppressWarnings("all")
+public class Command {
+ /**
+ * Title of the command, like `save`.
+ */
+ @NonNull
+ private String title;
+
+ /**
+ * The identifier of the actual command handler.
+ */
+ @NonNull
+ private String command;
+
+ /**
+ * Arguments that the command handler should be invoked with.
+ */
+ private List<Object> arguments;
+
+ public Command() {
+ }
+
+ public Command(@NonNull final String title, @NonNull final String command) {
+ this.title = Preconditions.<String>checkNotNull(title, "title");
+ this.command = Preconditions.<String>checkNotNull(command, "command");
+ }
+
+ public Command(@NonNull final String title, @NonNull final String command, final List<Object> arguments) {
+ this(title, command);
+ this.arguments = arguments;
+ }
+
+ /**
+ * Title of the command, like `save`.
+ */
+ @Pure
+ @NonNull
+ public String getTitle() {
+ return this.title;
+ }
+
+ /**
+ * Title of the command, like `save`.
+ */
+ public void setTitle(@NonNull final String title) {
+ this.title = Preconditions.checkNotNull(title, "title");
+ }
+
+ /**
+ * The identifier of the actual command handler.
+ */
+ @Pure
+ @NonNull
+ public String getCommand() {
+ return this.command;
+ }
+
+ /**
+ * The identifier of the actual command handler.
+ */
+ public void setCommand(@NonNull final String command) {
+ this.command = Preconditions.checkNotNull(command, "command");
+ }
+
+ /**
+ * Arguments that the command handler should be invoked with.
+ */
+ @Pure
+ public List<Object> getArguments() {
+ return this.arguments;
+ }
+
+ /**
+ * Arguments that the command handler should be invoked with.
+ */
+ public void setArguments(final List<Object> arguments) {
+ this.arguments = arguments;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("title", this.title);
+ b.add("command", this.command);
+ b.add("arguments", this.arguments);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Command other = (Command) obj;
+ if (this.title == null) {
+ if (other.title != null)
+ return false;
+ } else if (!this.title.equals(other.title))
+ return false;
+ if (this.command == null) {
+ if (other.command != null)
+ return false;
+ } else if (!this.command.equals(other.command))
+ return false;
+ if (this.arguments == null) {
+ if (other.arguments != null)
+ return false;
+ } else if (!this.arguments.equals(other.arguments))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.title== null) ? 0 : this.title.hashCode());
+ result = prime * result + ((this.command== null) ? 0 : this.command.hashCode());
+ return prime * result + ((this.arguments== null) ? 0 : this.arguments.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CompletionCapabilities.java b/java/org/eclipse/lsp4j/CompletionCapabilities.java
new file mode 100644
index 0000000..cf81ce4
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionCapabilities.java
@@ -0,0 +1,159 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.CompletionItemCapabilities;
+import org.eclipse.lsp4j.CompletionItemKindCapabilities;
+import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Capabilities specific to the `textDocument/completion`
+ */
+@SuppressWarnings("all")
+public class CompletionCapabilities extends DynamicRegistrationCapabilities {
+ /**
+ * The client supports the following {@link CompletionItem} specific
+ * capabilities.
+ */
+ private CompletionItemCapabilities completionItem;
+
+ /**
+ * The client supports the following {@link CompletionItemKind} specific
+ * capabilities.
+ */
+ private CompletionItemKindCapabilities completionItemKind;
+
+ /**
+ * The client supports sending additional context information for a
+ * `textDocument/completion` request.
+ */
+ private Boolean contextSupport;
+
+ public CompletionCapabilities() {
+ }
+
+ public CompletionCapabilities(final CompletionItemCapabilities completionItem) {
+ this.completionItem = completionItem;
+ }
+
+ public CompletionCapabilities(final CompletionItemKindCapabilities completionItemKind) {
+ this.completionItemKind = completionItemKind;
+ }
+
+ public CompletionCapabilities(final Boolean contextSupport) {
+ this.contextSupport = contextSupport;
+ }
+
+ /**
+ * The client supports the following {@link CompletionItem} specific
+ * capabilities.
+ */
+ @Pure
+ public CompletionItemCapabilities getCompletionItem() {
+ return this.completionItem;
+ }
+
+ /**
+ * The client supports the following {@link CompletionItem} specific
+ * capabilities.
+ */
+ public void setCompletionItem(final CompletionItemCapabilities completionItem) {
+ this.completionItem = completionItem;
+ }
+
+ /**
+ * The client supports the following {@link CompletionItemKind} specific
+ * capabilities.
+ */
+ @Pure
+ public CompletionItemKindCapabilities getCompletionItemKind() {
+ return this.completionItemKind;
+ }
+
+ /**
+ * The client supports the following {@link CompletionItemKind} specific
+ * capabilities.
+ */
+ public void setCompletionItemKind(final CompletionItemKindCapabilities completionItemKind) {
+ this.completionItemKind = completionItemKind;
+ }
+
+ /**
+ * The client supports sending additional context information for a
+ * `textDocument/completion` request.
+ */
+ @Pure
+ public Boolean getContextSupport() {
+ return this.contextSupport;
+ }
+
+ /**
+ * The client supports sending additional context information for a
+ * `textDocument/completion` request.
+ */
+ public void setContextSupport(final Boolean contextSupport) {
+ this.contextSupport = contextSupport;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("completionItem", this.completionItem);
+ b.add("completionItemKind", this.completionItemKind);
+ b.add("contextSupport", this.contextSupport);
+ b.add("dynamicRegistration", getDynamicRegistration());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CompletionCapabilities other = (CompletionCapabilities) obj;
+ if (this.completionItem == null) {
+ if (other.completionItem != null)
+ return false;
+ } else if (!this.completionItem.equals(other.completionItem))
+ return false;
+ if (this.completionItemKind == null) {
+ if (other.completionItemKind != null)
+ return false;
+ } else if (!this.completionItemKind.equals(other.completionItemKind))
+ return false;
+ if (this.contextSupport == null) {
+ if (other.contextSupport != null)
+ return false;
+ } else if (!this.contextSupport.equals(other.contextSupport))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((this.completionItem== null) ? 0 : this.completionItem.hashCode());
+ result = prime * result + ((this.completionItemKind== null) ? 0 : this.completionItemKind.hashCode());
+ return prime * result + ((this.contextSupport== null) ? 0 : this.contextSupport.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CompletionContext.java b/java/org/eclipse/lsp4j/CompletionContext.java
new file mode 100644
index 0000000..f4db969
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionContext.java
@@ -0,0 +1,119 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.CompletionTriggerKind;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class CompletionContext {
+ /**
+ * How the completion was triggered.
+ */
+ @NonNull
+ private CompletionTriggerKind triggerKind;
+
+ /**
+ * The trigger character (a single character) that has trigger code complete.
+ * Is undefined if {@link #triggerKind} is not {@link CompletionTriggerKind#TriggerCharacter}.
+ */
+ private String triggerCharacter;
+
+ public CompletionContext() {
+ }
+
+ public CompletionContext(@NonNull final CompletionTriggerKind triggerKind) {
+ this.triggerKind = Preconditions.<CompletionTriggerKind>checkNotNull(triggerKind, "triggerKind");
+ }
+
+ public CompletionContext(@NonNull final CompletionTriggerKind triggerKind, final String triggerCharacter) {
+ this(triggerKind);
+ this.triggerCharacter = triggerCharacter;
+ }
+
+ /**
+ * How the completion was triggered.
+ */
+ @Pure
+ @NonNull
+ public CompletionTriggerKind getTriggerKind() {
+ return this.triggerKind;
+ }
+
+ /**
+ * How the completion was triggered.
+ */
+ public void setTriggerKind(@NonNull final CompletionTriggerKind triggerKind) {
+ this.triggerKind = Preconditions.checkNotNull(triggerKind, "triggerKind");
+ }
+
+ /**
+ * The trigger character (a single character) that has trigger code complete.
+ * Is undefined if {@link #triggerKind} is not {@link CompletionTriggerKind#TriggerCharacter}.
+ */
+ @Pure
+ public String getTriggerCharacter() {
+ return this.triggerCharacter;
+ }
+
+ /**
+ * The trigger character (a single character) that has trigger code complete.
+ * Is undefined if {@link #triggerKind} is not {@link CompletionTriggerKind#TriggerCharacter}.
+ */
+ public void setTriggerCharacter(final String triggerCharacter) {
+ this.triggerCharacter = triggerCharacter;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("triggerKind", this.triggerKind);
+ b.add("triggerCharacter", this.triggerCharacter);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CompletionContext other = (CompletionContext) obj;
+ if (this.triggerKind == null) {
+ if (other.triggerKind != null)
+ return false;
+ } else if (!this.triggerKind.equals(other.triggerKind))
+ return false;
+ if (this.triggerCharacter == null) {
+ if (other.triggerCharacter != null)
+ return false;
+ } else if (!this.triggerCharacter.equals(other.triggerCharacter))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.triggerKind== null) ? 0 : this.triggerKind.hashCode());
+ return prime * result + ((this.triggerCharacter== null) ? 0 : this.triggerCharacter.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CompletionItem.java b/java/org/eclipse/lsp4j/CompletionItem.java
new file mode 100644
index 0000000..7909b4f
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionItem.java
@@ -0,0 +1,687 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import com.google.gson.annotations.JsonAdapter;
+import java.util.List;
+import org.eclipse.lsp4j.Command;
+import org.eclipse.lsp4j.CompletionItemKind;
+import org.eclipse.lsp4j.CompletionItemTag;
+import org.eclipse.lsp4j.InsertReplaceEdit;
+import org.eclipse.lsp4j.InsertTextFormat;
+import org.eclipse.lsp4j.InsertTextMode;
+import org.eclipse.lsp4j.MarkupContent;
+import org.eclipse.lsp4j.TextEdit;
+import org.eclipse.lsp4j.adapters.CompletionItemTextEditTypeAdapter;
+import org.eclipse.lsp4j.jsonrpc.json.adapters.JsonElementTypeAdapter;
+import org.eclipse.lsp4j.jsonrpc.messages.Either;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The Completion request is sent from the client to the server to compute completion items at a given cursor position.
+ * Completion items are presented in the IntelliSense user class. If computing complete completion items is expensive
+ * servers can additional provide a handler for the resolve completion item request. This request is send when a
+ * completion item is selected in the user class.
+ */
+@SuppressWarnings("all")
+public class CompletionItem {
+ /**
+ * The label of this completion item. By default also the text that is inserted when selecting this completion.
+ */
+ @NonNull
+ private String label;
+
+ /**
+ * The kind of this completion item. Based of the kind an icon is chosen by the editor.
+ */
+ private CompletionItemKind kind;
+
+ /**
+ * Tags for this completion item.
+ * <p>
+ * Since 3.15.0
+ */
+ private List<CompletionItemTag> tags;
+
+ /**
+ * A human-readable string with additional information about this item, like type or symbol information.
+ */
+ private String detail;
+
+ /**
+ * A human-readable string that represents a doc-comment.
+ */
+ private Either<String, MarkupContent> documentation;
+
+ /**
+ * Indicates if this item is deprecated.
+ *
+ * @deprecated Use {@link #tags} instead if supported.
+ */
+ @Deprecated
+ private Boolean deprecated;
+
+ /**
+ * Select this item when showing.
+ * <p>
+ * <em>Note</em> that only one completion item can be selected and that the
+ * tool / client decides which item that is. The rule is that the <em>first</em>
+ * item of those that match best is selected.
+ */
+ private Boolean preselect;
+
+ /**
+ * A string that should be used when comparing this item with other items. When `falsy` the label is used.
+ */
+ private String sortText;
+
+ /**
+ * A string that should be used when filtering a set of completion items. When `falsy` the label is used.
+ */
+ private String filterText;
+
+ /**
+ * A string that should be inserted a document when selecting this completion. When `falsy` the label is used.
+ */
+ private String insertText;
+
+ /**
+ * The format of the insert text. The format applies to both the {@link #insertText} property
+ * and the {@code newText} property of a provided {@link #textEdit}.
+ */
+ private InsertTextFormat insertTextFormat;
+
+ /**
+ * How whitespace and indentation is handled during completion item
+ * insertion. If not provided, the client's default value is used.
+ * <p>
+ * Since 3.16.0
+ */
+ private InsertTextMode insertTextMode;
+
+ /**
+ * An edit which is applied to a document when selecting this completion.
+ * When an edit is provided the value of {@link #insertText} is ignored.
+ * <p>
+ * <em>Note:</em> The range of the edit must be a single line range and it must
+ * contain the position at which completion has been requested.
+ * <p>
+ * Most editors support two different operations when accepting a completion
+ * item. One is to insert a completion text and the other is to replace an
+ * existing text with a completion text. Since this can usually not be
+ * predetermined by a server it can report both ranges. Clients need to
+ * signal support for {@link InsertReplaceEdit}s via the
+ * {@link CompletionItemCapabilities#insertReplaceSupport} client capability
+ * property.
+ * <p>
+ * <em>Note 1:</em> The text edit's range as well as both ranges from an insert
+ * replace edit must be a [single line] and they must contain the position
+ * at which completion has been requested.
+ * <p>
+ * <em>Note 2:</em> If an {@link InsertReplaceEdit} is returned the edit's insert range
+ * must be a prefix of the edit's replace range, that means it must be
+ * contained and starting at the same position.
+ * <p>
+ * Since 3.16.0 additional type {@link InsertReplaceEdit}
+ */
+ @JsonAdapter(CompletionItemTextEditTypeAdapter.class)
+ private Either<TextEdit, InsertReplaceEdit> textEdit;
+
+ /**
+ * An optional array of additional text edits that are applied when
+ * selecting this completion. Edits must not overlap (including the same insert position)
+ * with the main edit nor with themselves.
+ * <p>
+ * Additional text edits should be used to change text unrelated to the current cursor position
+ * (for example adding an import statement at the top of the file if the completion item will
+ * insert an unqualified type).
+ */
+ private List<TextEdit> additionalTextEdits;
+
+ /**
+ * An optional set of characters that when pressed while this completion is active will accept it first and
+ * then type that character. <em>Note</em> that all commit characters should have {@code length=1} and that superfluous
+ * characters will be ignored.
+ */
+ private List<String> commitCharacters;
+
+ /**
+ * An optional command that is executed <em>after</em> inserting this completion. <em>Note</em> that
+ * additional modifications to the current document should be described with the
+ * {@link #additionalTextEdits} property.
+ */
+ private Command command;
+
+ /**
+ * A data entry field that is preserved on a completion item between a completion and a completion resolve request.
+ */
+ @JsonAdapter(JsonElementTypeAdapter.Factory.class)
+ private Object data;
+
+ public CompletionItem() {
+ }
+
+ public CompletionItem(@NonNull final String label) {
+ this.label = Preconditions.<String>checkNotNull(label, "label");
+ }
+
+ /**
+ * The label of this completion item. By default also the text that is inserted when selecting this completion.
+ */
+ @Pure
+ @NonNull
+ public String getLabel() {
+ return this.label;
+ }
+
+ /**
+ * The label of this completion item. By default also the text that is inserted when selecting this completion.
+ */
+ public void setLabel(@NonNull final String label) {
+ this.label = Preconditions.checkNotNull(label, "label");
+ }
+
+ /**
+ * The kind of this completion item. Based of the kind an icon is chosen by the editor.
+ */
+ @Pure
+ public CompletionItemKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * The kind of this completion item. Based of the kind an icon is chosen by the editor.
+ */
+ public void setKind(final CompletionItemKind kind) {
+ this.kind = kind;
+ }
+
+ /**
+ * Tags for this completion item.
+ * <p>
+ * Since 3.15.0
+ */
+ @Pure
+ public List<CompletionItemTag> getTags() {
+ return this.tags;
+ }
+
+ /**
+ * Tags for this completion item.
+ * <p>
+ * Since 3.15.0
+ */
+ public void setTags(final List<CompletionItemTag> tags) {
+ this.tags = tags;
+ }
+
+ /**
+ * A human-readable string with additional information about this item, like type or symbol information.
+ */
+ @Pure
+ public String getDetail() {
+ return this.detail;
+ }
+
+ /**
+ * A human-readable string with additional information about this item, like type or symbol information.
+ */
+ public void setDetail(final String detail) {
+ this.detail = detail;
+ }
+
+ /**
+ * A human-readable string that represents a doc-comment.
+ */
+ @Pure
+ public Either<String, MarkupContent> getDocumentation() {
+ return this.documentation;
+ }
+
+ /**
+ * A human-readable string that represents a doc-comment.
+ */
+ public void setDocumentation(final Either<String, MarkupContent> documentation) {
+ this.documentation = documentation;
+ }
+
+ public void setDocumentation(final String documentation) {
+ if (documentation == null) {
+ this.documentation = null;
+ return;
+ }
+ this.documentation = Either.forLeft(documentation);
+ }
+
+ public void setDocumentation(final MarkupContent documentation) {
+ if (documentation == null) {
+ this.documentation = null;
+ return;
+ }
+ this.documentation = Either.forRight(documentation);
+ }
+
+ /**
+ * Indicates if this item is deprecated.
+ *
+ * @deprecated Use {@link #tags} instead if supported.
+ */
+ @Pure
+ @Deprecated
+ public Boolean getDeprecated() {
+ return this.deprecated;
+ }
+
+ /**
+ * Indicates if this item is deprecated.
+ *
+ * @deprecated Use {@link #tags} instead if supported.
+ */
+ @Deprecated
+ public void setDeprecated(final Boolean deprecated) {
+ this.deprecated = deprecated;
+ }
+
+ /**
+ * Select this item when showing.
+ * <p>
+ * <em>Note</em> that only one completion item can be selected and that the
+ * tool / client decides which item that is. The rule is that the <em>first</em>
+ * item of those that match best is selected.
+ */
+ @Pure
+ public Boolean getPreselect() {
+ return this.preselect;
+ }
+
+ /**
+ * Select this item when showing.
+ * <p>
+ * <em>Note</em> that only one completion item can be selected and that the
+ * tool / client decides which item that is. The rule is that the <em>first</em>
+ * item of those that match best is selected.
+ */
+ public void setPreselect(final Boolean preselect) {
+ this.preselect = preselect;
+ }
+
+ /**
+ * A string that should be used when comparing this item with other items. When `falsy` the label is used.
+ */
+ @Pure
+ public String getSortText() {
+ return this.sortText;
+ }
+
+ /**
+ * A string that should be used when comparing this item with other items. When `falsy` the label is used.
+ */
+ public void setSortText(final String sortText) {
+ this.sortText = sortText;
+ }
+
+ /**
+ * A string that should be used when filtering a set of completion items. When `falsy` the label is used.
+ */
+ @Pure
+ public String getFilterText() {
+ return this.filterText;
+ }
+
+ /**
+ * A string that should be used when filtering a set of completion items. When `falsy` the label is used.
+ */
+ public void setFilterText(final String filterText) {
+ this.filterText = filterText;
+ }
+
+ /**
+ * A string that should be inserted a document when selecting this completion. When `falsy` the label is used.
+ */
+ @Pure
+ public String getInsertText() {
+ return this.insertText;
+ }
+
+ /**
+ * A string that should be inserted a document when selecting this completion. When `falsy` the label is used.
+ */
+ public void setInsertText(final String insertText) {
+ this.insertText = insertText;
+ }
+
+ /**
+ * The format of the insert text. The format applies to both the {@link #insertText} property
+ * and the {@code newText} property of a provided {@link #textEdit}.
+ */
+ @Pure
+ public InsertTextFormat getInsertTextFormat() {
+ return this.insertTextFormat;
+ }
+
+ /**
+ * The format of the insert text. The format applies to both the {@link #insertText} property
+ * and the {@code newText} property of a provided {@link #textEdit}.
+ */
+ public void setInsertTextFormat(final InsertTextFormat insertTextFormat) {
+ this.insertTextFormat = insertTextFormat;
+ }
+
+ /**
+ * How whitespace and indentation is handled during completion item
+ * insertion. If not provided, the client's default value is used.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public InsertTextMode getInsertTextMode() {
+ return this.insertTextMode;
+ }
+
+ /**
+ * How whitespace and indentation is handled during completion item
+ * insertion. If not provided, the client's default value is used.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setInsertTextMode(final InsertTextMode insertTextMode) {
+ this.insertTextMode = insertTextMode;
+ }
+
+ /**
+ * An edit which is applied to a document when selecting this completion.
+ * When an edit is provided the value of {@link #insertText} is ignored.
+ * <p>
+ * <em>Note:</em> The range of the edit must be a single line range and it must
+ * contain the position at which completion has been requested.
+ * <p>
+ * Most editors support two different operations when accepting a completion
+ * item. One is to insert a completion text and the other is to replace an
+ * existing text with a completion text. Since this can usually not be
+ * predetermined by a server it can report both ranges. Clients need to
+ * signal support for {@link InsertReplaceEdit}s via the
+ * {@link CompletionItemCapabilities#insertReplaceSupport} client capability
+ * property.
+ * <p>
+ * <em>Note 1:</em> The text edit's range as well as both ranges from an insert
+ * replace edit must be a [single line] and they must contain the position
+ * at which completion has been requested.
+ * <p>
+ * <em>Note 2:</em> If an {@link InsertReplaceEdit} is returned the edit's insert range
+ * must be a prefix of the edit's replace range, that means it must be
+ * contained and starting at the same position.
+ * <p>
+ * Since 3.16.0 additional type {@link InsertReplaceEdit}
+ */
+ @Pure
+ public Either<TextEdit, InsertReplaceEdit> getTextEdit() {
+ return this.textEdit;
+ }
+
+ /**
+ * An edit which is applied to a document when selecting this completion.
+ * When an edit is provided the value of {@link #insertText} is ignored.
+ * <p>
+ * <em>Note:</em> The range of the edit must be a single line range and it must
+ * contain the position at which completion has been requested.
+ * <p>
+ * Most editors support two different operations when accepting a completion
+ * item. One is to insert a completion text and the other is to replace an
+ * existing text with a completion text. Since this can usually not be
+ * predetermined by a server it can report both ranges. Clients need to
+ * signal support for {@link InsertReplaceEdit}s via the
+ * {@link CompletionItemCapabilities#insertReplaceSupport} client capability
+ * property.
+ * <p>
+ * <em>Note 1:</em> The text edit's range as well as both ranges from an insert
+ * replace edit must be a [single line] and they must contain the position
+ * at which completion has been requested.
+ * <p>
+ * <em>Note 2:</em> If an {@link InsertReplaceEdit} is returned the edit's insert range
+ * must be a prefix of the edit's replace range, that means it must be
+ * contained and starting at the same position.
+ * <p>
+ * Since 3.16.0 additional type {@link InsertReplaceEdit}
+ */
+ public void setTextEdit(final Either<TextEdit, InsertReplaceEdit> textEdit) {
+ this.textEdit = textEdit;
+ }
+
+ /**
+ * An optional array of additional text edits that are applied when
+ * selecting this completion. Edits must not overlap (including the same insert position)
+ * with the main edit nor with themselves.
+ * <p>
+ * Additional text edits should be used to change text unrelated to the current cursor position
+ * (for example adding an import statement at the top of the file if the completion item will
+ * insert an unqualified type).
+ */
+ @Pure
+ public List<TextEdit> getAdditionalTextEdits() {
+ return this.additionalTextEdits;
+ }
+
+ /**
+ * An optional array of additional text edits that are applied when
+ * selecting this completion. Edits must not overlap (including the same insert position)
+ * with the main edit nor with themselves.
+ * <p>
+ * Additional text edits should be used to change text unrelated to the current cursor position
+ * (for example adding an import statement at the top of the file if the completion item will
+ * insert an unqualified type).
+ */
+ public void setAdditionalTextEdits(final List<TextEdit> additionalTextEdits) {
+ this.additionalTextEdits = additionalTextEdits;
+ }
+
+ /**
+ * An optional set of characters that when pressed while this completion is active will accept it first and
+ * then type that character. <em>Note</em> that all commit characters should have {@code length=1} and that superfluous
+ * characters will be ignored.
+ */
+ @Pure
+ public List<String> getCommitCharacters() {
+ return this.commitCharacters;
+ }
+
+ /**
+ * An optional set of characters that when pressed while this completion is active will accept it first and
+ * then type that character. <em>Note</em> that all commit characters should have {@code length=1} and that superfluous
+ * characters will be ignored.
+ */
+ public void setCommitCharacters(final List<String> commitCharacters) {
+ this.commitCharacters = commitCharacters;
+ }
+
+ /**
+ * An optional command that is executed <em>after</em> inserting this completion. <em>Note</em> that
+ * additional modifications to the current document should be described with the
+ * {@link #additionalTextEdits} property.
+ */
+ @Pure
+ public Command getCommand() {
+ return this.command;
+ }
+
+ /**
+ * An optional command that is executed <em>after</em> inserting this completion. <em>Note</em> that
+ * additional modifications to the current document should be described with the
+ * {@link #additionalTextEdits} property.
+ */
+ public void setCommand(final Command command) {
+ this.command = command;
+ }
+
+ /**
+ * A data entry field that is preserved on a completion item between a completion and a completion resolve request.
+ */
+ @Pure
+ public Object getData() {
+ return this.data;
+ }
+
+ /**
+ * A data entry field that is preserved on a completion item between a completion and a completion resolve request.
+ */
+ public void setData(final Object data) {
+ this.data = data;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("label", this.label);
+ b.add("kind", this.kind);
+ b.add("tags", this.tags);
+ b.add("detail", this.detail);
+ b.add("documentation", this.documentation);
+ b.add("deprecated", this.deprecated);
+ b.add("preselect", this.preselect);
+ b.add("sortText", this.sortText);
+ b.add("filterText", this.filterText);
+ b.add("insertText", this.insertText);
+ b.add("insertTextFormat", this.insertTextFormat);
+ b.add("insertTextMode", this.insertTextMode);
+ b.add("textEdit", this.textEdit);
+ b.add("additionalTextEdits", this.additionalTextEdits);
+ b.add("commitCharacters", this.commitCharacters);
+ b.add("command", this.command);
+ b.add("data", this.data);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CompletionItem other = (CompletionItem) obj;
+ if (this.label == null) {
+ if (other.label != null)
+ return false;
+ } else if (!this.label.equals(other.label))
+ return false;
+ if (this.kind == null) {
+ if (other.kind != null)
+ return false;
+ } else if (!this.kind.equals(other.kind))
+ return false;
+ if (this.tags == null) {
+ if (other.tags != null)
+ return false;
+ } else if (!this.tags.equals(other.tags))
+ return false;
+ if (this.detail == null) {
+ if (other.detail != null)
+ return false;
+ } else if (!this.detail.equals(other.detail))
+ return false;
+ if (this.documentation == null) {
+ if (other.documentation != null)
+ return false;
+ } else if (!this.documentation.equals(other.documentation))
+ return false;
+ if (this.deprecated == null) {
+ if (other.deprecated != null)
+ return false;
+ } else if (!this.deprecated.equals(other.deprecated))
+ return false;
+ if (this.preselect == null) {
+ if (other.preselect != null)
+ return false;
+ } else if (!this.preselect.equals(other.preselect))
+ return false;
+ if (this.sortText == null) {
+ if (other.sortText != null)
+ return false;
+ } else if (!this.sortText.equals(other.sortText))
+ return false;
+ if (this.filterText == null) {
+ if (other.filterText != null)
+ return false;
+ } else if (!this.filterText.equals(other.filterText))
+ return false;
+ if (this.insertText == null) {
+ if (other.insertText != null)
+ return false;
+ } else if (!this.insertText.equals(other.insertText))
+ return false;
+ if (this.insertTextFormat == null) {
+ if (other.insertTextFormat != null)
+ return false;
+ } else if (!this.insertTextFormat.equals(other.insertTextFormat))
+ return false;
+ if (this.insertTextMode == null) {
+ if (other.insertTextMode != null)
+ return false;
+ } else if (!this.insertTextMode.equals(other.insertTextMode))
+ return false;
+ if (this.textEdit == null) {
+ if (other.textEdit != null)
+ return false;
+ } else if (!this.textEdit.equals(other.textEdit))
+ return false;
+ if (this.additionalTextEdits == null) {
+ if (other.additionalTextEdits != null)
+ return false;
+ } else if (!this.additionalTextEdits.equals(other.additionalTextEdits))
+ return false;
+ if (this.commitCharacters == null) {
+ if (other.commitCharacters != null)
+ return false;
+ } else if (!this.commitCharacters.equals(other.commitCharacters))
+ return false;
+ if (this.command == null) {
+ if (other.command != null)
+ return false;
+ } else if (!this.command.equals(other.command))
+ return false;
+ if (this.data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!this.data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.label== null) ? 0 : this.label.hashCode());
+ result = prime * result + ((this.kind== null) ? 0 : this.kind.hashCode());
+ result = prime * result + ((this.tags== null) ? 0 : this.tags.hashCode());
+ result = prime * result + ((this.detail== null) ? 0 : this.detail.hashCode());
+ result = prime * result + ((this.documentation== null) ? 0 : this.documentation.hashCode());
+ result = prime * result + ((this.deprecated== null) ? 0 : this.deprecated.hashCode());
+ result = prime * result + ((this.preselect== null) ? 0 : this.preselect.hashCode());
+ result = prime * result + ((this.sortText== null) ? 0 : this.sortText.hashCode());
+ result = prime * result + ((this.filterText== null) ? 0 : this.filterText.hashCode());
+ result = prime * result + ((this.insertText== null) ? 0 : this.insertText.hashCode());
+ result = prime * result + ((this.insertTextFormat== null) ? 0 : this.insertTextFormat.hashCode());
+ result = prime * result + ((this.insertTextMode== null) ? 0 : this.insertTextMode.hashCode());
+ result = prime * result + ((this.textEdit== null) ? 0 : this.textEdit.hashCode());
+ result = prime * result + ((this.additionalTextEdits== null) ? 0 : this.additionalTextEdits.hashCode());
+ result = prime * result + ((this.commitCharacters== null) ? 0 : this.commitCharacters.hashCode());
+ result = prime * result + ((this.command== null) ? 0 : this.command.hashCode());
+ return prime * result + ((this.data== null) ? 0 : this.data.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CompletionItemCapabilities.java b/java/org/eclipse/lsp4j/CompletionItemCapabilities.java
new file mode 100644
index 0000000..4dfe81b
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionItemCapabilities.java
@@ -0,0 +1,368 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.CompletionItemInsertTextModeSupportCapabilities;
+import org.eclipse.lsp4j.CompletionItemResolveSupportCapabilities;
+import org.eclipse.lsp4j.CompletionItemTagSupportCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The client supports the following {@link CompletionItem} specific capabilities.
+ */
+@SuppressWarnings("all")
+public class CompletionItemCapabilities {
+ /**
+ * Client supports snippets as insert text.
+ * <p>
+ * A snippet can define tab stops and placeholders with `$1`, `$2`
+ * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
+ * the end of the snippet. Placeholders with equal identifiers are linked,
+ * that is typing in one will update others too.
+ */
+ private Boolean snippetSupport;
+
+ /**
+ * Client supports commit characters on a completion item.
+ */
+ private Boolean commitCharactersSupport;
+
+ /**
+ * Client supports the following content formats for the documentation
+ * property. The order describes the preferred format of the client.
+ */
+ private List<String> documentationFormat;
+
+ /**
+ * Client supports the deprecated property on a completion item.
+ */
+ private Boolean deprecatedSupport;
+
+ /**
+ * Client supports the preselect property on a completion item.
+ */
+ private Boolean preselectSupport;
+
+ /**
+ * Client supports the tag property on a completion item. Clients supporting
+ * tags have to handle unknown tags gracefully. Clients especially need to
+ * preserve unknown tags when sending a completion item back to the server in
+ * a resolve call.
+ * <p>
+ * Since 3.15.0
+ */
+ private CompletionItemTagSupportCapabilities tagSupport;
+
+ /**
+ * Client support insert replace edit to control different behavior if a
+ * completion item is inserted in the text or should replace text.
+ * <p>
+ * Since 3.16.0
+ */
+ private Boolean insertReplaceSupport;
+
+ /**
+ * Indicates which properties a client can resolve lazily on a completion
+ * item. Before version 3.16.0 only the predefined properties {@link CompletionItem#documentation}
+ * and {@link CompletionItem#detail} could be resolved lazily.
+ * <p>
+ * Since 3.16.0
+ */
+ private CompletionItemResolveSupportCapabilities resolveSupport;
+
+ /**
+ * The client supports the {@link CompletionItem#insertTextMode} property on
+ * a completion item to override the whitespace handling mode
+ * as defined by the client.
+ * <p>
+ * Since 3.16.0
+ */
+ private CompletionItemInsertTextModeSupportCapabilities insertTextModeSupport;
+
+ public CompletionItemCapabilities() {
+ }
+
+ public CompletionItemCapabilities(final Boolean snippetSupport) {
+ this.snippetSupport = snippetSupport;
+ }
+
+ /**
+ * Client supports snippets as insert text.
+ * <p>
+ * A snippet can define tab stops and placeholders with `$1`, `$2`
+ * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
+ * the end of the snippet. Placeholders with equal identifiers are linked,
+ * that is typing in one will update others too.
+ */
+ @Pure
+ public Boolean getSnippetSupport() {
+ return this.snippetSupport;
+ }
+
+ /**
+ * Client supports snippets as insert text.
+ * <p>
+ * A snippet can define tab stops and placeholders with `$1`, `$2`
+ * and `${3:foo}`. `$0` defines the final tab stop, it defaults to
+ * the end of the snippet. Placeholders with equal identifiers are linked,
+ * that is typing in one will update others too.
+ */
+ public void setSnippetSupport(final Boolean snippetSupport) {
+ this.snippetSupport = snippetSupport;
+ }
+
+ /**
+ * Client supports commit characters on a completion item.
+ */
+ @Pure
+ public Boolean getCommitCharactersSupport() {
+ return this.commitCharactersSupport;
+ }
+
+ /**
+ * Client supports commit characters on a completion item.
+ */
+ public void setCommitCharactersSupport(final Boolean commitCharactersSupport) {
+ this.commitCharactersSupport = commitCharactersSupport;
+ }
+
+ /**
+ * Client supports the following content formats for the documentation
+ * property. The order describes the preferred format of the client.
+ */
+ @Pure
+ public List<String> getDocumentationFormat() {
+ return this.documentationFormat;
+ }
+
+ /**
+ * Client supports the following content formats for the documentation
+ * property. The order describes the preferred format of the client.
+ */
+ public void setDocumentationFormat(final List<String> documentationFormat) {
+ this.documentationFormat = documentationFormat;
+ }
+
+ /**
+ * Client supports the deprecated property on a completion item.
+ */
+ @Pure
+ public Boolean getDeprecatedSupport() {
+ return this.deprecatedSupport;
+ }
+
+ /**
+ * Client supports the deprecated property on a completion item.
+ */
+ public void setDeprecatedSupport(final Boolean deprecatedSupport) {
+ this.deprecatedSupport = deprecatedSupport;
+ }
+
+ /**
+ * Client supports the preselect property on a completion item.
+ */
+ @Pure
+ public Boolean getPreselectSupport() {
+ return this.preselectSupport;
+ }
+
+ /**
+ * Client supports the preselect property on a completion item.
+ */
+ public void setPreselectSupport(final Boolean preselectSupport) {
+ this.preselectSupport = preselectSupport;
+ }
+
+ /**
+ * Client supports the tag property on a completion item. Clients supporting
+ * tags have to handle unknown tags gracefully. Clients especially need to
+ * preserve unknown tags when sending a completion item back to the server in
+ * a resolve call.
+ * <p>
+ * Since 3.15.0
+ */
+ @Pure
+ public CompletionItemTagSupportCapabilities getTagSupport() {
+ return this.tagSupport;
+ }
+
+ /**
+ * Client supports the tag property on a completion item. Clients supporting
+ * tags have to handle unknown tags gracefully. Clients especially need to
+ * preserve unknown tags when sending a completion item back to the server in
+ * a resolve call.
+ * <p>
+ * Since 3.15.0
+ */
+ public void setTagSupport(final CompletionItemTagSupportCapabilities tagSupport) {
+ this.tagSupport = tagSupport;
+ }
+
+ /**
+ * Client support insert replace edit to control different behavior if a
+ * completion item is inserted in the text or should replace text.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public Boolean getInsertReplaceSupport() {
+ return this.insertReplaceSupport;
+ }
+
+ /**
+ * Client support insert replace edit to control different behavior if a
+ * completion item is inserted in the text or should replace text.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setInsertReplaceSupport(final Boolean insertReplaceSupport) {
+ this.insertReplaceSupport = insertReplaceSupport;
+ }
+
+ /**
+ * Indicates which properties a client can resolve lazily on a completion
+ * item. Before version 3.16.0 only the predefined properties {@link CompletionItem#documentation}
+ * and {@link CompletionItem#detail} could be resolved lazily.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public CompletionItemResolveSupportCapabilities getResolveSupport() {
+ return this.resolveSupport;
+ }
+
+ /**
+ * Indicates which properties a client can resolve lazily on a completion
+ * item. Before version 3.16.0 only the predefined properties {@link CompletionItem#documentation}
+ * and {@link CompletionItem#detail} could be resolved lazily.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setResolveSupport(final CompletionItemResolveSupportCapabilities resolveSupport) {
+ this.resolveSupport = resolveSupport;
+ }
+
+ /**
+ * The client supports the {@link CompletionItem#insertTextMode} property on
+ * a completion item to override the whitespace handling mode
+ * as defined by the client.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public CompletionItemInsertTextModeSupportCapabilities getInsertTextModeSupport() {
+ return this.insertTextModeSupport;
+ }
+
+ /**
+ * The client supports the {@link CompletionItem#insertTextMode} property on
+ * a completion item to override the whitespace handling mode
+ * as defined by the client.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setInsertTextModeSupport(final CompletionItemInsertTextModeSupportCapabilities insertTextModeSupport) {
+ this.insertTextModeSupport = insertTextModeSupport;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("snippetSupport", this.snippetSupport);
+ b.add("commitCharactersSupport", this.commitCharactersSupport);
+ b.add("documentationFormat", this.documentationFormat);
+ b.add("deprecatedSupport", this.deprecatedSupport);
+ b.add("preselectSupport", this.preselectSupport);
+ b.add("tagSupport", this.tagSupport);
+ b.add("insertReplaceSupport", this.insertReplaceSupport);
+ b.add("resolveSupport", this.resolveSupport);
+ b.add("insertTextModeSupport", this.insertTextModeSupport);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CompletionItemCapabilities other = (CompletionItemCapabilities) obj;
+ if (this.snippetSupport == null) {
+ if (other.snippetSupport != null)
+ return false;
+ } else if (!this.snippetSupport.equals(other.snippetSupport))
+ return false;
+ if (this.commitCharactersSupport == null) {
+ if (other.commitCharactersSupport != null)
+ return false;
+ } else if (!this.commitCharactersSupport.equals(other.commitCharactersSupport))
+ return false;
+ if (this.documentationFormat == null) {
+ if (other.documentationFormat != null)
+ return false;
+ } else if (!this.documentationFormat.equals(other.documentationFormat))
+ return false;
+ if (this.deprecatedSupport == null) {
+ if (other.deprecatedSupport != null)
+ return false;
+ } else if (!this.deprecatedSupport.equals(other.deprecatedSupport))
+ return false;
+ if (this.preselectSupport == null) {
+ if (other.preselectSupport != null)
+ return false;
+ } else if (!this.preselectSupport.equals(other.preselectSupport))
+ return false;
+ if (this.tagSupport == null) {
+ if (other.tagSupport != null)
+ return false;
+ } else if (!this.tagSupport.equals(other.tagSupport))
+ return false;
+ if (this.insertReplaceSupport == null) {
+ if (other.insertReplaceSupport != null)
+ return false;
+ } else if (!this.insertReplaceSupport.equals(other.insertReplaceSupport))
+ return false;
+ if (this.resolveSupport == null) {
+ if (other.resolveSupport != null)
+ return false;
+ } else if (!this.resolveSupport.equals(other.resolveSupport))
+ return false;
+ if (this.insertTextModeSupport == null) {
+ if (other.insertTextModeSupport != null)
+ return false;
+ } else if (!this.insertTextModeSupport.equals(other.insertTextModeSupport))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.snippetSupport== null) ? 0 : this.snippetSupport.hashCode());
+ result = prime * result + ((this.commitCharactersSupport== null) ? 0 : this.commitCharactersSupport.hashCode());
+ result = prime * result + ((this.documentationFormat== null) ? 0 : this.documentationFormat.hashCode());
+ result = prime * result + ((this.deprecatedSupport== null) ? 0 : this.deprecatedSupport.hashCode());
+ result = prime * result + ((this.preselectSupport== null) ? 0 : this.preselectSupport.hashCode());
+ result = prime * result + ((this.tagSupport== null) ? 0 : this.tagSupport.hashCode());
+ result = prime * result + ((this.insertReplaceSupport== null) ? 0 : this.insertReplaceSupport.hashCode());
+ result = prime * result + ((this.resolveSupport== null) ? 0 : this.resolveSupport.hashCode());
+ return prime * result + ((this.insertTextModeSupport== null) ? 0 : this.insertTextModeSupport.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CompletionItemInsertTextModeSupportCapabilities.java b/java/org/eclipse/lsp4j/CompletionItemInsertTextModeSupportCapabilities.java
new file mode 100644
index 0000000..3596bb3
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionItemInsertTextModeSupportCapabilities.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.lsp4j.InsertTextMode;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The client supports the {@link CompletionItem#insertTextMode} property on
+ * a completion item to override the whitespace handling mode
+ * as defined by the client.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CompletionItemInsertTextModeSupportCapabilities {
+ @NonNull
+ private List<InsertTextMode> valueSet;
+
+ public CompletionItemInsertTextModeSupportCapabilities() {
+ ArrayList<InsertTextMode> _arrayList = new ArrayList<InsertTextMode>();
+ this.valueSet = _arrayList;
+ }
+
+ public CompletionItemInsertTextModeSupportCapabilities(@NonNull final List<InsertTextMode> valueSet) {
+ this.valueSet = Preconditions.<List<InsertTextMode>>checkNotNull(valueSet, "valueSet");
+ }
+
+ @Pure
+ @NonNull
+ public List<InsertTextMode> getValueSet() {
+ return this.valueSet;
+ }
+
+ public void setValueSet(@NonNull final List<InsertTextMode> valueSet) {
+ this.valueSet = Preconditions.checkNotNull(valueSet, "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;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CompletionItemInsertTextModeSupportCapabilities other = (CompletionItemInsertTextModeSupportCapabilities) obj;
+ if (this.valueSet == null) {
+ if (other.valueSet != null)
+ return false;
+ } else if (!this.valueSet.equals(other.valueSet))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.valueSet== null) ? 0 : this.valueSet.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CompletionItemKind.java b/java/org/eclipse/lsp4j/CompletionItemKind.java
new file mode 100644
index 0000000..2840f81
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionItemKind.java
@@ -0,0 +1,86 @@
+/******************************************************************************
+ * Copyright (c) 2016 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ ******************************************************************************/
+package org.eclipse.lsp4j;
+
+/**
+ * The kind of a completion entry.
+ */
+public enum CompletionItemKind {
+
+ Text(1),
+
+ Method(2),
+
+ Function(3),
+
+ Constructor(4),
+
+ Field(5),
+
+ Variable(6),
+
+ Class(7),
+
+ Interface(8),
+
+ Module(9),
+
+ Property(10),
+
+ Unit(11),
+
+ Value(12),
+
+ Enum(13),
+
+ Keyword(14),
+
+ Snippet(15),
+
+ Color(16),
+
+ File(17),
+
+ Reference(18),
+
+ Folder(19),
+
+ EnumMember(20),
+
+ Constant(21),
+
+ Struct(22),
+
+ Event(23),
+
+ Operator(24),
+
+ TypeParameter(25);
+
+ private final int value;
+
+ CompletionItemKind(int value) {
+ this.value = value;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+ public static CompletionItemKind forValue(int value) {
+ CompletionItemKind[] allValues = CompletionItemKind.values();
+ if (value < 1 || value > allValues.length)
+ throw new IllegalArgumentException("Illegal enum value: " + value);
+ return allValues[value - 1];
+ }
+
+}
diff --git a/java/org/eclipse/lsp4j/CompletionItemKindCapabilities.java b/java/org/eclipse/lsp4j/CompletionItemKindCapabilities.java
new file mode 100644
index 0000000..e93bb9f
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionItemKindCapabilities.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.CompletionItemKind;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The client supports the following {@link CompletionItemKind} specific
+ * capabilities.
+ */
+@SuppressWarnings("all")
+public class CompletionItemKindCapabilities {
+ /**
+ * The completion item kind values the client supports. When this
+ * property exists the client also guarantees that it will
+ * handle values outside its set gracefully and falls back
+ * to a default value when unknown.
+ * <p>
+ * If this property is not present the client only supports
+ * the completion items kinds from {@link CompletionItemKind#Text} to
+ * {@link CompletionItemKind#Reference} as defined in the initial version of the protocol.
+ */
+ private List<CompletionItemKind> valueSet;
+
+ public CompletionItemKindCapabilities() {
+ }
+
+ public CompletionItemKindCapabilities(final List<CompletionItemKind> valueSet) {
+ this.valueSet = valueSet;
+ }
+
+ /**
+ * The completion item kind values the client supports. When this
+ * property exists the client also guarantees that it will
+ * handle values outside its set gracefully and falls back
+ * to a default value when unknown.
+ * <p>
+ * If this property is not present the client only supports
+ * the completion items kinds from {@link CompletionItemKind#Text} to
+ * {@link CompletionItemKind#Reference} as defined in the initial version of the protocol.
+ */
+ @Pure
+ public List<CompletionItemKind> getValueSet() {
+ return this.valueSet;
+ }
+
+ /**
+ * The completion item kind values the client supports. When this
+ * property exists the client also guarantees that it will
+ * handle values outside its set gracefully and falls back
+ * to a default value when unknown.
+ * <p>
+ * If this property is not present the client only supports
+ * the completion items kinds from {@link CompletionItemKind#Text} to
+ * {@link CompletionItemKind#Reference} as defined in the initial version of the protocol.
+ */
+ public void setValueSet(final List<CompletionItemKind> valueSet) {
+ this.valueSet = 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;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CompletionItemKindCapabilities other = (CompletionItemKindCapabilities) obj;
+ if (this.valueSet == null) {
+ if (other.valueSet != null)
+ return false;
+ } else if (!this.valueSet.equals(other.valueSet))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.valueSet== null) ? 0 : this.valueSet.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CompletionItemResolveSupportCapabilities.java b/java/org/eclipse/lsp4j/CompletionItemResolveSupportCapabilities.java
new file mode 100644
index 0000000..e80ed7c
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionItemResolveSupportCapabilities.java
@@ -0,0 +1,92 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Indicates which properties a client can resolve lazily on a completion
+ * item. Before version 3.16.0 only the predefined properties {@link CompletionItem#documentation}
+ * and {@link CompletionItem#detail} could be resolved lazily.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CompletionItemResolveSupportCapabilities {
+ /**
+ * The properties that a client can resolve lazily.
+ */
+ @NonNull
+ private List<String> properties;
+
+ public CompletionItemResolveSupportCapabilities() {
+ ArrayList<String> _arrayList = new ArrayList<String>();
+ this.properties = _arrayList;
+ }
+
+ public CompletionItemResolveSupportCapabilities(@NonNull final List<String> properties) {
+ this.properties = Preconditions.<List<String>>checkNotNull(properties, "properties");
+ }
+
+ /**
+ * The properties that a client can resolve lazily.
+ */
+ @Pure
+ @NonNull
+ public List<String> getProperties() {
+ return this.properties;
+ }
+
+ /**
+ * The properties that a client can resolve lazily.
+ */
+ public void setProperties(@NonNull final List<String> properties) {
+ this.properties = Preconditions.checkNotNull(properties, "properties");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("properties", this.properties);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CompletionItemResolveSupportCapabilities other = (CompletionItemResolveSupportCapabilities) obj;
+ if (this.properties == null) {
+ if (other.properties != null)
+ return false;
+ } else if (!this.properties.equals(other.properties))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.properties== null) ? 0 : this.properties.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CompletionItemTag.java b/java/org/eclipse/lsp4j/CompletionItemTag.java
new file mode 100644
index 0000000..4ed1288
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionItemTag.java
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ ******************************************************************************/
+
+package org.eclipse.lsp4j;
+
+/**
+ * Completion item tags are extra annotations that tweak the rendering of a completion
+ * item.
+ *
+ * Since 3.15.0
+ */
+public enum CompletionItemTag {
+
+ /**
+ * Render a completion as obsolete, usually using a strike-out.
+ */
+ Deprecated(1);
+
+ private final int value;
+
+ CompletionItemTag(int value) {
+ this.value = value;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+ public static CompletionItemTag forValue(int value) {
+ CompletionItemTag[] allValues = CompletionItemTag.values();
+ if (value < 1 || value > allValues.length)
+ throw new IllegalArgumentException("Illegal enum value: " + value);
+ return allValues[value - 1];
+ }
+}
\ No newline at end of file
diff --git a/java/org/eclipse/lsp4j/CompletionItemTagSupportCapabilities.java b/java/org/eclipse/lsp4j/CompletionItemTagSupportCapabilities.java
new file mode 100644
index 0000000..05f5294
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionItemTagSupportCapabilities.java
@@ -0,0 +1,94 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.lsp4j.CompletionItemTag;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Client supports the tag property on a completion item. Clients supporting
+ * tags have to handle unknown tags gracefully. Clients especially need to
+ * preserve unknown tags when sending a completion item back to the server in
+ * a resolve call.
+ * <p>
+ * Since 3.15.0
+ */
+@SuppressWarnings("all")
+public class CompletionItemTagSupportCapabilities {
+ /**
+ * The tags supported by the client.
+ */
+ @NonNull
+ private List<CompletionItemTag> valueSet;
+
+ public CompletionItemTagSupportCapabilities() {
+ ArrayList<CompletionItemTag> _arrayList = new ArrayList<CompletionItemTag>();
+ this.valueSet = _arrayList;
+ }
+
+ public CompletionItemTagSupportCapabilities(@NonNull final List<CompletionItemTag> valueSet) {
+ this.valueSet = Preconditions.<List<CompletionItemTag>>checkNotNull(valueSet, "valueSet");
+ }
+
+ /**
+ * The tags supported by the client.
+ */
+ @Pure
+ @NonNull
+ public List<CompletionItemTag> getValueSet() {
+ return this.valueSet;
+ }
+
+ /**
+ * The tags supported by the client.
+ */
+ public void setValueSet(@NonNull final List<CompletionItemTag> valueSet) {
+ this.valueSet = Preconditions.checkNotNull(valueSet, "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;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CompletionItemTagSupportCapabilities other = (CompletionItemTagSupportCapabilities) obj;
+ if (this.valueSet == null) {
+ if (other.valueSet != null)
+ return false;
+ } else if (!this.valueSet.equals(other.valueSet))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.valueSet== null) ? 0 : this.valueSet.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CompletionList.java b/java/org/eclipse/lsp4j/CompletionList.java
new file mode 100644
index 0000000..249a348
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionList.java
@@ -0,0 +1,119 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.lsp4j.CompletionItem;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Represents a collection of completion items to be presented in the editor.
+ */
+@SuppressWarnings("all")
+public class CompletionList {
+ /**
+ * This list it not complete. Further typing should result in recomputing this list.
+ */
+ private boolean isIncomplete;
+
+ /**
+ * The completion items.
+ */
+ @NonNull
+ private List<CompletionItem> items;
+
+ public CompletionList() {
+ this(new ArrayList<CompletionItem>());
+ }
+
+ public CompletionList(@NonNull final List<CompletionItem> items) {
+ this.items = Preconditions.<List<CompletionItem>>checkNotNull(items, "items");
+ }
+
+ public CompletionList(final boolean isIncomplete, @NonNull final List<CompletionItem> items) {
+ this(items);
+ this.isIncomplete = isIncomplete;
+ }
+
+ /**
+ * This list it not complete. Further typing should result in recomputing this list.
+ */
+ @Pure
+ public boolean isIncomplete() {
+ return this.isIncomplete;
+ }
+
+ /**
+ * This list it not complete. Further typing should result in recomputing this list.
+ */
+ public void setIsIncomplete(final boolean isIncomplete) {
+ this.isIncomplete = isIncomplete;
+ }
+
+ /**
+ * The completion items.
+ */
+ @Pure
+ @NonNull
+ public List<CompletionItem> getItems() {
+ return this.items;
+ }
+
+ /**
+ * The completion items.
+ */
+ public void setItems(@NonNull final List<CompletionItem> items) {
+ this.items = Preconditions.checkNotNull(items, "items");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("isIncomplete", this.isIncomplete);
+ b.add("items", this.items);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CompletionList other = (CompletionList) obj;
+ if (other.isIncomplete != this.isIncomplete)
+ return false;
+ if (this.items == null) {
+ if (other.items != null)
+ return false;
+ } else if (!this.items.equals(other.items))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (this.isIncomplete ? 1231 : 1237);
+ return prime * result + ((this.items== null) ? 0 : this.items.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CompletionOptions.java b/java/org/eclipse/lsp4j/CompletionOptions.java
new file mode 100644
index 0000000..c678a6b
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionOptions.java
@@ -0,0 +1,166 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.AbstractWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Completion options.
+ */
+@SuppressWarnings("all")
+public class CompletionOptions extends AbstractWorkDoneProgressOptions {
+ /**
+ * The server provides support to resolve additional information for a completion item.
+ */
+ private Boolean resolveProvider;
+
+ /**
+ * The characters that trigger completion automatically.
+ */
+ private List<String> triggerCharacters;
+
+ /**
+ * The list of all possible characters that commit a completion. This field
+ * can be used if clients don't support individual commit characters per
+ * completion item. See client capability
+ * {@link CompletionItemCapabilities#commitCharactersSupport}.
+ * <p>
+ * If a server provides both {@code allCommitCharacters} and commit characters on
+ * an individual completion item the ones on the completion item win.
+ * <p>
+ * Since 3.2.0
+ */
+ private List<String> allCommitCharacters;
+
+ public CompletionOptions() {
+ }
+
+ public CompletionOptions(final Boolean resolveProvider, final List<String> triggerCharacters) {
+ this.resolveProvider = resolveProvider;
+ this.triggerCharacters = triggerCharacters;
+ }
+
+ /**
+ * The server provides support to resolve additional information for a completion item.
+ */
+ @Pure
+ public Boolean getResolveProvider() {
+ return this.resolveProvider;
+ }
+
+ /**
+ * The server provides support to resolve additional information for a completion item.
+ */
+ public void setResolveProvider(final Boolean resolveProvider) {
+ this.resolveProvider = resolveProvider;
+ }
+
+ /**
+ * The characters that trigger completion automatically.
+ */
+ @Pure
+ public List<String> getTriggerCharacters() {
+ return this.triggerCharacters;
+ }
+
+ /**
+ * The characters that trigger completion automatically.
+ */
+ public void setTriggerCharacters(final List<String> triggerCharacters) {
+ this.triggerCharacters = triggerCharacters;
+ }
+
+ /**
+ * The list of all possible characters that commit a completion. This field
+ * can be used if clients don't support individual commit characters per
+ * completion item. See client capability
+ * {@link CompletionItemCapabilities#commitCharactersSupport}.
+ * <p>
+ * If a server provides both {@code allCommitCharacters} and commit characters on
+ * an individual completion item the ones on the completion item win.
+ * <p>
+ * Since 3.2.0
+ */
+ @Pure
+ public List<String> getAllCommitCharacters() {
+ return this.allCommitCharacters;
+ }
+
+ /**
+ * The list of all possible characters that commit a completion. This field
+ * can be used if clients don't support individual commit characters per
+ * completion item. See client capability
+ * {@link CompletionItemCapabilities#commitCharactersSupport}.
+ * <p>
+ * If a server provides both {@code allCommitCharacters} and commit characters on
+ * an individual completion item the ones on the completion item win.
+ * <p>
+ * Since 3.2.0
+ */
+ public void setAllCommitCharacters(final List<String> allCommitCharacters) {
+ this.allCommitCharacters = allCommitCharacters;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("resolveProvider", this.resolveProvider);
+ b.add("triggerCharacters", this.triggerCharacters);
+ b.add("allCommitCharacters", this.allCommitCharacters);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CompletionOptions other = (CompletionOptions) obj;
+ if (this.resolveProvider == null) {
+ if (other.resolveProvider != null)
+ return false;
+ } else if (!this.resolveProvider.equals(other.resolveProvider))
+ return false;
+ if (this.triggerCharacters == null) {
+ if (other.triggerCharacters != null)
+ return false;
+ } else if (!this.triggerCharacters.equals(other.triggerCharacters))
+ return false;
+ if (this.allCommitCharacters == null) {
+ if (other.allCommitCharacters != null)
+ return false;
+ } else if (!this.allCommitCharacters.equals(other.allCommitCharacters))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((this.resolveProvider== null) ? 0 : this.resolveProvider.hashCode());
+ result = prime * result + ((this.triggerCharacters== null) ? 0 : this.triggerCharacters.hashCode());
+ return prime * result + ((this.allCommitCharacters== null) ? 0 : this.allCommitCharacters.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CompletionParams.java b/java/org/eclipse/lsp4j/CompletionParams.java
new file mode 100644
index 0000000..700ba55
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionParams.java
@@ -0,0 +1,100 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.CompletionContext;
+import org.eclipse.lsp4j.Position;
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.TextDocumentPositionAndWorkDoneProgressAndPartialResultParams;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The Completion request is sent from the client to the server to compute completion items at a given cursor position.
+ */
+@SuppressWarnings("all")
+public class CompletionParams extends TextDocumentPositionAndWorkDoneProgressAndPartialResultParams {
+ /**
+ * The completion context. This is only available if the client specifies
+ * to send this using {@link CompletionCapabilities#contextSupport} as true.
+ */
+ private CompletionContext context;
+
+ public CompletionParams() {
+ }
+
+ public CompletionParams(@NonNull final TextDocumentIdentifier textDocument, @NonNull final Position position) {
+ super(textDocument, position);
+ }
+
+ public CompletionParams(@NonNull final TextDocumentIdentifier textDocument, @NonNull final Position position, final CompletionContext context) {
+ this(textDocument, position);
+ this.context = context;
+ }
+
+ /**
+ * The completion context. This is only available if the client specifies
+ * to send this using {@link CompletionCapabilities#contextSupport} as true.
+ */
+ @Pure
+ public CompletionContext getContext() {
+ return this.context;
+ }
+
+ /**
+ * The completion context. This is only available if the client specifies
+ * to send this using {@link CompletionCapabilities#contextSupport} as true.
+ */
+ public void setContext(final CompletionContext context) {
+ this.context = context;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("context", this.context);
+ b.add("partialResultToken", getPartialResultToken());
+ b.add("workDoneToken", getWorkDoneToken());
+ b.add("textDocument", getTextDocument());
+ b.add("uri", getUri());
+ b.add("position", getPosition());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CompletionParams other = (CompletionParams) obj;
+ if (this.context == null) {
+ if (other.context != null)
+ return false;
+ } else if (!this.context.equals(other.context))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.context== null) ? 0 : this.context.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CompletionRegistrationOptions.java b/java/org/eclipse/lsp4j/CompletionRegistrationOptions.java
new file mode 100644
index 0000000..70edeca
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionRegistrationOptions.java
@@ -0,0 +1,185 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.AbstractTextDocumentRegistrationAndWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class CompletionRegistrationOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions {
+ /**
+ * Most tools trigger completion request automatically without explicitly requesting
+ * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
+ * starts to type an identifier. For example if the user types `c` in a JavaScript file
+ * code complete will automatically pop up present `console` besides others as a
+ * completion item. Characters that make up identifiers don't need to be listed here.
+ * <p>
+ * If code complete should automatically be trigger on characters not being valid inside
+ * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
+ */
+ private List<String> triggerCharacters;
+
+ /**
+ * The server provides support to resolve additional information for a completion item.
+ */
+ private Boolean resolveProvider;
+
+ /**
+ * The list of all possible characters that commit a completion. This field
+ * can be used if clients don't support individual commit characters per
+ * completion item. See client capability
+ * {@link CompletionItemCapabilities#commitCharactersSupport}.
+ * <p>
+ * If a server provides both {@code allCommitCharacters} and commit characters on
+ * an individual completion item the ones on the completion item win.
+ * <p>
+ * Since 3.2.0
+ */
+ private List<String> allCommitCharacters;
+
+ public CompletionRegistrationOptions() {
+ }
+
+ public CompletionRegistrationOptions(final List<String> triggerCharacters, final Boolean resolveProvider) {
+ this.triggerCharacters = triggerCharacters;
+ this.resolveProvider = resolveProvider;
+ }
+
+ /**
+ * Most tools trigger completion request automatically without explicitly requesting
+ * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
+ * starts to type an identifier. For example if the user types `c` in a JavaScript file
+ * code complete will automatically pop up present `console` besides others as a
+ * completion item. Characters that make up identifiers don't need to be listed here.
+ * <p>
+ * If code complete should automatically be trigger on characters not being valid inside
+ * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
+ */
+ @Pure
+ public List<String> getTriggerCharacters() {
+ return this.triggerCharacters;
+ }
+
+ /**
+ * Most tools trigger completion request automatically without explicitly requesting
+ * it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
+ * starts to type an identifier. For example if the user types `c` in a JavaScript file
+ * code complete will automatically pop up present `console` besides others as a
+ * completion item. Characters that make up identifiers don't need to be listed here.
+ * <p>
+ * If code complete should automatically be trigger on characters not being valid inside
+ * an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
+ */
+ public void setTriggerCharacters(final List<String> triggerCharacters) {
+ this.triggerCharacters = triggerCharacters;
+ }
+
+ /**
+ * The server provides support to resolve additional information for a completion item.
+ */
+ @Pure
+ public Boolean getResolveProvider() {
+ return this.resolveProvider;
+ }
+
+ /**
+ * The server provides support to resolve additional information for a completion item.
+ */
+ public void setResolveProvider(final Boolean resolveProvider) {
+ this.resolveProvider = resolveProvider;
+ }
+
+ /**
+ * The list of all possible characters that commit a completion. This field
+ * can be used if clients don't support individual commit characters per
+ * completion item. See client capability
+ * {@link CompletionItemCapabilities#commitCharactersSupport}.
+ * <p>
+ * If a server provides both {@code allCommitCharacters} and commit characters on
+ * an individual completion item the ones on the completion item win.
+ * <p>
+ * Since 3.2.0
+ */
+ @Pure
+ public List<String> getAllCommitCharacters() {
+ return this.allCommitCharacters;
+ }
+
+ /**
+ * The list of all possible characters that commit a completion. This field
+ * can be used if clients don't support individual commit characters per
+ * completion item. See client capability
+ * {@link CompletionItemCapabilities#commitCharactersSupport}.
+ * <p>
+ * If a server provides both {@code allCommitCharacters} and commit characters on
+ * an individual completion item the ones on the completion item win.
+ * <p>
+ * Since 3.2.0
+ */
+ public void setAllCommitCharacters(final List<String> allCommitCharacters) {
+ this.allCommitCharacters = allCommitCharacters;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("triggerCharacters", this.triggerCharacters);
+ b.add("resolveProvider", this.resolveProvider);
+ b.add("allCommitCharacters", this.allCommitCharacters);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ b.add("documentSelector", getDocumentSelector());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CompletionRegistrationOptions other = (CompletionRegistrationOptions) obj;
+ if (this.triggerCharacters == null) {
+ if (other.triggerCharacters != null)
+ return false;
+ } else if (!this.triggerCharacters.equals(other.triggerCharacters))
+ return false;
+ if (this.resolveProvider == null) {
+ if (other.resolveProvider != null)
+ return false;
+ } else if (!this.resolveProvider.equals(other.resolveProvider))
+ return false;
+ if (this.allCommitCharacters == null) {
+ if (other.allCommitCharacters != null)
+ return false;
+ } else if (!this.allCommitCharacters.equals(other.allCommitCharacters))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((this.triggerCharacters== null) ? 0 : this.triggerCharacters.hashCode());
+ result = prime * result + ((this.resolveProvider== null) ? 0 : this.resolveProvider.hashCode());
+ return prime * result + ((this.allCommitCharacters== null) ? 0 : this.allCommitCharacters.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CompletionTriggerKind.java b/java/org/eclipse/lsp4j/CompletionTriggerKind.java
new file mode 100644
index 0000000..02bb99d
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CompletionTriggerKind.java
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * Copyright (c) 2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ ******************************************************************************/
+package org.eclipse.lsp4j;
+
+/**
+ * How a completion was triggered
+ */
+public enum CompletionTriggerKind {
+
+ /**
+ * Completion was triggered by typing an identifier (24x7 code
+ * complete), manual invocation (e.g Ctrl+Space) or via API.
+ */
+ Invoked(1),
+
+ /**
+ * Completion was triggered by a trigger character specified by
+ * the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
+ */
+ TriggerCharacter(2),
+
+ /**
+ * Completion was re-triggered as the current completion list is incomplete.
+ */
+ TriggerForIncompleteCompletions(3);
+
+ private final int value;
+
+ CompletionTriggerKind(int value) {
+ this.value = value;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+ public static CompletionTriggerKind forValue(int value) {
+ CompletionTriggerKind[] allValues = CompletionTriggerKind.values();
+ if (value < 1 || value > allValues.length)
+ throw new IllegalArgumentException("Illegal enum value: " + value);
+ return allValues[value - 1];
+ }
+
+}
diff --git a/java/org/eclipse/lsp4j/ConfigurationItem.java b/java/org/eclipse/lsp4j/ConfigurationItem.java
new file mode 100644
index 0000000..14b8c6f
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ConfigurationItem.java
@@ -0,0 +1,112 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * A ConfigurationItem consist of the configuration section to ask for and an additional scope URI.
+ * The configuration section asked for is defined by the server and doesn’t necessarily need to
+ * correspond to the configuration store used by the client. So a server might ask for a configuration
+ * {@code cpp.formatterOptions} but the client stores the configuration in an XML store layout differently.
+ * It is up to the client to do the necessary conversion. If a scope URI is provided the client
+ * should return the setting scoped to the provided resource. If the client for example uses
+ * EditorConfig to manage its settings the configuration should be returned for the passed resource
+ * URI. If the client can't provide a configuration setting for a given scope then null needs to be
+ * present in the returned array.
+ * <p>
+ * Since 3.6.0
+ */
+@SuppressWarnings("all")
+public class ConfigurationItem {
+ /**
+ * The scope to get the configuration section for.
+ */
+ private String scopeUri;
+
+ /**
+ * The configuration section asked for.
+ */
+ private String section;
+
+ /**
+ * The scope to get the configuration section for.
+ */
+ @Pure
+ public String getScopeUri() {
+ return this.scopeUri;
+ }
+
+ /**
+ * The scope to get the configuration section for.
+ */
+ public void setScopeUri(final String scopeUri) {
+ this.scopeUri = scopeUri;
+ }
+
+ /**
+ * The configuration section asked for.
+ */
+ @Pure
+ public String getSection() {
+ return this.section;
+ }
+
+ /**
+ * The configuration section asked for.
+ */
+ public void setSection(final String section) {
+ this.section = section;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("scopeUri", this.scopeUri);
+ b.add("section", this.section);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ConfigurationItem other = (ConfigurationItem) obj;
+ if (this.scopeUri == null) {
+ if (other.scopeUri != null)
+ return false;
+ } else if (!this.scopeUri.equals(other.scopeUri))
+ return false;
+ if (this.section == null) {
+ if (other.section != null)
+ return false;
+ } else if (!this.section.equals(other.section))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.scopeUri== null) ? 0 : this.scopeUri.hashCode());
+ return prime * result + ((this.section== null) ? 0 : this.section.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ConfigurationParams.java b/java/org/eclipse/lsp4j/ConfigurationParams.java
new file mode 100644
index 0000000..e4fc656
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ConfigurationParams.java
@@ -0,0 +1,83 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.ConfigurationItem;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The workspace/configuration request is sent from the server to the client to fetch configuration
+ * settings from the client. The request can fetch several configuration settings in one roundtrip.
+ * The order of the returned configuration settings correspond to the order of the passed
+ * {@link ConfigurationItem}s (e.g. the first item in the response is the result for the first
+ * configuration item in the params).
+ * <p>
+ * Since 3.6.0
+ */
+@SuppressWarnings("all")
+public class ConfigurationParams {
+ @NonNull
+ private List<ConfigurationItem> items;
+
+ public ConfigurationParams() {
+ }
+
+ public ConfigurationParams(@NonNull final List<ConfigurationItem> items) {
+ this.items = Preconditions.<List<ConfigurationItem>>checkNotNull(items, "items");
+ }
+
+ @Pure
+ @NonNull
+ public List<ConfigurationItem> getItems() {
+ return this.items;
+ }
+
+ public void setItems(@NonNull final List<ConfigurationItem> items) {
+ this.items = Preconditions.checkNotNull(items, "items");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("items", this.items);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ConfigurationParams other = (ConfigurationParams) obj;
+ if (this.items == null) {
+ if (other.items != null)
+ return false;
+ } else if (!this.items.equals(other.items))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.items== null) ? 0 : this.items.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CreateFile.java b/java/org/eclipse/lsp4j/CreateFile.java
new file mode 100644
index 0000000..7494ee5
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CreateFile.java
@@ -0,0 +1,127 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.CreateFileOptions;
+import org.eclipse.lsp4j.ResourceOperation;
+import org.eclipse.lsp4j.ResourceOperationKind;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Create file operation
+ */
+@SuppressWarnings("all")
+public class CreateFile extends ResourceOperation {
+ /**
+ * The resource to create.
+ */
+ @NonNull
+ private String uri;
+
+ /**
+ * Additional options
+ */
+ private CreateFileOptions options;
+
+ public CreateFile() {
+ super(ResourceOperationKind.Create);
+ }
+
+ public CreateFile(@NonNull final String uri) {
+ super(ResourceOperationKind.Create);
+ this.uri = Preconditions.<String>checkNotNull(uri, "uri");
+ }
+
+ public CreateFile(@NonNull final String uri, final CreateFileOptions options) {
+ this(uri);
+ this.options = options;
+ }
+
+ /**
+ * The resource to create.
+ */
+ @Pure
+ @NonNull
+ public String getUri() {
+ return this.uri;
+ }
+
+ /**
+ * The resource to create.
+ */
+ public void setUri(@NonNull final String uri) {
+ this.uri = Preconditions.checkNotNull(uri, "uri");
+ }
+
+ /**
+ * Additional options
+ */
+ @Pure
+ public CreateFileOptions getOptions() {
+ return this.options;
+ }
+
+ /**
+ * Additional options
+ */
+ public void setOptions(final CreateFileOptions options) {
+ this.options = options;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("uri", this.uri);
+ b.add("options", this.options);
+ b.add("kind", getKind());
+ b.add("annotationId", getAnnotationId());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ CreateFile other = (CreateFile) obj;
+ if (this.uri == null) {
+ if (other.uri != null)
+ return false;
+ } else if (!this.uri.equals(other.uri))
+ return false;
+ if (this.options == null) {
+ if (other.options != null)
+ return false;
+ } else if (!this.options.equals(other.options))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((this.uri== null) ? 0 : this.uri.hashCode());
+ return prime * result + ((this.options== null) ? 0 : this.options.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CreateFileOptions.java b/java/org/eclipse/lsp4j/CreateFileOptions.java
new file mode 100644
index 0000000..5deb7ee
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CreateFileOptions.java
@@ -0,0 +1,110 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Options to create a file.
+ */
+@SuppressWarnings("all")
+public class CreateFileOptions {
+ /**
+ * Overwrite existing file. Overwrite wins over {@link #ignoreIfExists}
+ */
+ private Boolean overwrite;
+
+ /**
+ * Ignore if exists.
+ */
+ private Boolean ignoreIfExists;
+
+ public CreateFileOptions() {
+ }
+
+ public CreateFileOptions(final Boolean overwrite, final Boolean ignoreIfExists) {
+ this.overwrite = overwrite;
+ this.ignoreIfExists = ignoreIfExists;
+ }
+
+ /**
+ * Overwrite existing file. Overwrite wins over {@link #ignoreIfExists}
+ */
+ @Pure
+ public Boolean getOverwrite() {
+ return this.overwrite;
+ }
+
+ /**
+ * Overwrite existing file. Overwrite wins over {@link #ignoreIfExists}
+ */
+ public void setOverwrite(final Boolean overwrite) {
+ this.overwrite = overwrite;
+ }
+
+ /**
+ * Ignore if exists.
+ */
+ @Pure
+ public Boolean getIgnoreIfExists() {
+ return this.ignoreIfExists;
+ }
+
+ /**
+ * Ignore if exists.
+ */
+ public void setIgnoreIfExists(final Boolean ignoreIfExists) {
+ this.ignoreIfExists = ignoreIfExists;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("overwrite", this.overwrite);
+ b.add("ignoreIfExists", this.ignoreIfExists);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CreateFileOptions other = (CreateFileOptions) obj;
+ if (this.overwrite == null) {
+ if (other.overwrite != null)
+ return false;
+ } else if (!this.overwrite.equals(other.overwrite))
+ return false;
+ if (this.ignoreIfExists == null) {
+ if (other.ignoreIfExists != null)
+ return false;
+ } else if (!this.ignoreIfExists.equals(other.ignoreIfExists))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.overwrite== null) ? 0 : this.overwrite.hashCode());
+ return prime * result + ((this.ignoreIfExists== null) ? 0 : this.ignoreIfExists.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/CreateFilesParams.java b/java/org/eclipse/lsp4j/CreateFilesParams.java
new file mode 100644
index 0000000..cba17ab
--- /dev/null
+++ b/java/org/eclipse/lsp4j/CreateFilesParams.java
@@ -0,0 +1,90 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.lsp4j.FileCreate;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The parameters sent in notifications/requests for user-initiated creation
+ * of files.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class CreateFilesParams {
+ /**
+ * An array of all files/folders created in this operation.
+ */
+ @NonNull
+ private List<FileCreate> files = new ArrayList<FileCreate>();
+
+ public CreateFilesParams() {
+ }
+
+ public CreateFilesParams(@NonNull final List<FileCreate> files) {
+ this.files = Preconditions.<List<FileCreate>>checkNotNull(files, "files");
+ }
+
+ /**
+ * An array of all files/folders created in this operation.
+ */
+ @Pure
+ @NonNull
+ public List<FileCreate> getFiles() {
+ return this.files;
+ }
+
+ /**
+ * An array of all files/folders created in this operation.
+ */
+ public void setFiles(@NonNull final List<FileCreate> files) {
+ this.files = Preconditions.checkNotNull(files, "files");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("files", this.files);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ CreateFilesParams other = (CreateFilesParams) obj;
+ if (this.files == null) {
+ if (other.files != null)
+ return false;
+ } else if (!this.files.equals(other.files))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.files== null) ? 0 : this.files.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DeclarationCapabilities.java b/java/org/eclipse/lsp4j/DeclarationCapabilities.java
new file mode 100644
index 0000000..13c9184
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DeclarationCapabilities.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Capabilities specific to the `textDocument/declaration`
+ * <p>
+ * Since 3.14.0
+ */
+@SuppressWarnings("all")
+public class DeclarationCapabilities extends DynamicRegistrationCapabilities {
+ /**
+ * The client supports additional metadata in the form of declaration links.
+ */
+ private Boolean linkSupport;
+
+ public DeclarationCapabilities() {
+ }
+
+ public DeclarationCapabilities(final Boolean dynamicRegistration) {
+ super(dynamicRegistration);
+ }
+
+ public DeclarationCapabilities(final Boolean dynamicRegistration, final Boolean linkSupport) {
+ super(dynamicRegistration);
+ this.linkSupport = linkSupport;
+ }
+
+ /**
+ * The client supports additional metadata in the form of declaration links.
+ */
+ @Pure
+ public Boolean getLinkSupport() {
+ return this.linkSupport;
+ }
+
+ /**
+ * The client supports additional metadata in the form of declaration links.
+ */
+ public void setLinkSupport(final Boolean linkSupport) {
+ this.linkSupport = linkSupport;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("linkSupport", this.linkSupport);
+ b.add("dynamicRegistration", getDynamicRegistration());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DeclarationCapabilities other = (DeclarationCapabilities) obj;
+ if (this.linkSupport == null) {
+ if (other.linkSupport != null)
+ return false;
+ } else if (!this.linkSupport.equals(other.linkSupport))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.linkSupport== null) ? 0 : this.linkSupport.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DeclarationOptions.java b/java/org/eclipse/lsp4j/DeclarationOptions.java
new file mode 100644
index 0000000..a2dddfa
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DeclarationOptions.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class DeclarationOptions extends AbstractWorkDoneProgressOptions {
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DeclarationParams.java b/java/org/eclipse/lsp4j/DeclarationParams.java
new file mode 100644
index 0000000..e64c062
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DeclarationParams.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.Position;
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.TextDocumentPositionAndWorkDoneProgressAndPartialResultParams;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The go to declaration request is sent from the client to the server to resolve the declaration
+ * location of a symbol at a given text document position.
+ */
+@SuppressWarnings("all")
+public class DeclarationParams extends TextDocumentPositionAndWorkDoneProgressAndPartialResultParams {
+ public DeclarationParams() {
+ }
+
+ public DeclarationParams(@NonNull final TextDocumentIdentifier textDocument, @NonNull final Position position) {
+ super(textDocument, position);
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("partialResultToken", getPartialResultToken());
+ b.add("workDoneToken", getWorkDoneToken());
+ b.add("textDocument", getTextDocument());
+ b.add("uri", getUri());
+ b.add("position", getPosition());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DeclarationRegistrationOptions.java b/java/org/eclipse/lsp4j/DeclarationRegistrationOptions.java
new file mode 100644
index 0000000..7445755
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DeclarationRegistrationOptions.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractTextDocumentRegistrationAndWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class DeclarationRegistrationOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions {
+ /**
+ * The id used to register the request. The id can be used to deregister
+ * the request again. See also Registration#id.
+ */
+ private String id;
+
+ public DeclarationRegistrationOptions() {
+ }
+
+ public DeclarationRegistrationOptions(final String id) {
+ this.id = id;
+ }
+
+ /**
+ * The id used to register the request. The id can be used to deregister
+ * the request again. See also Registration#id.
+ */
+ @Pure
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * The id used to register the request. The id can be used to deregister
+ * the request again. See also Registration#id.
+ */
+ public void setId(final String id) {
+ this.id = id;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("id", this.id);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ b.add("documentSelector", getDocumentSelector());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DeclarationRegistrationOptions other = (DeclarationRegistrationOptions) obj;
+ if (this.id == null) {
+ if (other.id != null)
+ return false;
+ } else if (!this.id.equals(other.id))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.id== null) ? 0 : this.id.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DefinitionCapabilities.java b/java/org/eclipse/lsp4j/DefinitionCapabilities.java
new file mode 100644
index 0000000..c2099a5
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DefinitionCapabilities.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Capabilities specific to the `textDocument/definition`
+ * <p>
+ * Since 3.14.0
+ */
+@SuppressWarnings("all")
+public class DefinitionCapabilities extends DynamicRegistrationCapabilities {
+ /**
+ * The client supports additional metadata in the form of definition links.
+ */
+ private Boolean linkSupport;
+
+ public DefinitionCapabilities() {
+ }
+
+ public DefinitionCapabilities(final Boolean dynamicRegistration) {
+ super(dynamicRegistration);
+ }
+
+ public DefinitionCapabilities(final Boolean dynamicRegistration, final Boolean linkSupport) {
+ super(dynamicRegistration);
+ this.linkSupport = linkSupport;
+ }
+
+ /**
+ * The client supports additional metadata in the form of definition links.
+ */
+ @Pure
+ public Boolean getLinkSupport() {
+ return this.linkSupport;
+ }
+
+ /**
+ * The client supports additional metadata in the form of definition links.
+ */
+ public void setLinkSupport(final Boolean linkSupport) {
+ this.linkSupport = linkSupport;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("linkSupport", this.linkSupport);
+ b.add("dynamicRegistration", getDynamicRegistration());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DefinitionCapabilities other = (DefinitionCapabilities) obj;
+ if (this.linkSupport == null) {
+ if (other.linkSupport != null)
+ return false;
+ } else if (!this.linkSupport.equals(other.linkSupport))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.linkSupport== null) ? 0 : this.linkSupport.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DefinitionOptions.java b/java/org/eclipse/lsp4j/DefinitionOptions.java
new file mode 100644
index 0000000..7e77640
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DefinitionOptions.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class DefinitionOptions extends AbstractWorkDoneProgressOptions {
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DefinitionParams.java b/java/org/eclipse/lsp4j/DefinitionParams.java
new file mode 100644
index 0000000..d289a9f
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DefinitionParams.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.Position;
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.TextDocumentPositionAndWorkDoneProgressAndPartialResultParams;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The go to definition request is sent from the client to the server to resolve the definition
+ * location of a symbol at a given text document position.
+ */
+@SuppressWarnings("all")
+public class DefinitionParams extends TextDocumentPositionAndWorkDoneProgressAndPartialResultParams {
+ public DefinitionParams() {
+ }
+
+ public DefinitionParams(@NonNull final TextDocumentIdentifier textDocument, @NonNull final Position position) {
+ super(textDocument, position);
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("partialResultToken", getPartialResultToken());
+ b.add("workDoneToken", getWorkDoneToken());
+ b.add("textDocument", getTextDocument());
+ b.add("uri", getUri());
+ b.add("position", getPosition());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DefinitionRegistrationOptions.java b/java/org/eclipse/lsp4j/DefinitionRegistrationOptions.java
new file mode 100644
index 0000000..c480a26
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DefinitionRegistrationOptions.java
@@ -0,0 +1,48 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractTextDocumentRegistrationAndWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class DefinitionRegistrationOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions {
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ b.add("documentSelector", getDocumentSelector());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DeleteFile.java b/java/org/eclipse/lsp4j/DeleteFile.java
new file mode 100644
index 0000000..904a317
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DeleteFile.java
@@ -0,0 +1,127 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.DeleteFileOptions;
+import org.eclipse.lsp4j.ResourceOperation;
+import org.eclipse.lsp4j.ResourceOperationKind;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Delete file operation
+ */
+@SuppressWarnings("all")
+public class DeleteFile extends ResourceOperation {
+ /**
+ * The file to delete.
+ */
+ @NonNull
+ private String uri;
+
+ /**
+ * Delete options.
+ */
+ private DeleteFileOptions options;
+
+ public DeleteFile() {
+ super(ResourceOperationKind.Delete);
+ }
+
+ public DeleteFile(@NonNull final String uri) {
+ super(ResourceOperationKind.Delete);
+ this.uri = Preconditions.<String>checkNotNull(uri, "uri");
+ }
+
+ public DeleteFile(@NonNull final String uri, final DeleteFileOptions options) {
+ this(uri);
+ this.options = options;
+ }
+
+ /**
+ * The file to delete.
+ */
+ @Pure
+ @NonNull
+ public String getUri() {
+ return this.uri;
+ }
+
+ /**
+ * The file to delete.
+ */
+ public void setUri(@NonNull final String uri) {
+ this.uri = Preconditions.checkNotNull(uri, "uri");
+ }
+
+ /**
+ * Delete options.
+ */
+ @Pure
+ public DeleteFileOptions getOptions() {
+ return this.options;
+ }
+
+ /**
+ * Delete options.
+ */
+ public void setOptions(final DeleteFileOptions options) {
+ this.options = options;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("uri", this.uri);
+ b.add("options", this.options);
+ b.add("kind", getKind());
+ b.add("annotationId", getAnnotationId());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DeleteFile other = (DeleteFile) obj;
+ if (this.uri == null) {
+ if (other.uri != null)
+ return false;
+ } else if (!this.uri.equals(other.uri))
+ return false;
+ if (this.options == null) {
+ if (other.options != null)
+ return false;
+ } else if (!this.options.equals(other.options))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((this.uri== null) ? 0 : this.uri.hashCode());
+ return prime * result + ((this.options== null) ? 0 : this.options.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DeleteFileOptions.java b/java/org/eclipse/lsp4j/DeleteFileOptions.java
new file mode 100644
index 0000000..2934b84
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DeleteFileOptions.java
@@ -0,0 +1,110 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Delete file options
+ */
+@SuppressWarnings("all")
+public class DeleteFileOptions {
+ /**
+ * Delete the content recursively if a folder is denoted.
+ */
+ private Boolean recursive;
+
+ /**
+ * Ignore the operation if the file doesn't exist.
+ */
+ private Boolean ignoreIfNotExists;
+
+ public DeleteFileOptions() {
+ }
+
+ public DeleteFileOptions(final Boolean recursive, final Boolean ignoreIfNotExists) {
+ this.recursive = recursive;
+ this.ignoreIfNotExists = ignoreIfNotExists;
+ }
+
+ /**
+ * Delete the content recursively if a folder is denoted.
+ */
+ @Pure
+ public Boolean getRecursive() {
+ return this.recursive;
+ }
+
+ /**
+ * Delete the content recursively if a folder is denoted.
+ */
+ public void setRecursive(final Boolean recursive) {
+ this.recursive = recursive;
+ }
+
+ /**
+ * Ignore the operation if the file doesn't exist.
+ */
+ @Pure
+ public Boolean getIgnoreIfNotExists() {
+ return this.ignoreIfNotExists;
+ }
+
+ /**
+ * Ignore the operation if the file doesn't exist.
+ */
+ public void setIgnoreIfNotExists(final Boolean ignoreIfNotExists) {
+ this.ignoreIfNotExists = ignoreIfNotExists;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("recursive", this.recursive);
+ b.add("ignoreIfNotExists", this.ignoreIfNotExists);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DeleteFileOptions other = (DeleteFileOptions) obj;
+ if (this.recursive == null) {
+ if (other.recursive != null)
+ return false;
+ } else if (!this.recursive.equals(other.recursive))
+ return false;
+ if (this.ignoreIfNotExists == null) {
+ if (other.ignoreIfNotExists != null)
+ return false;
+ } else if (!this.ignoreIfNotExists.equals(other.ignoreIfNotExists))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.recursive== null) ? 0 : this.recursive.hashCode());
+ return prime * result + ((this.ignoreIfNotExists== null) ? 0 : this.ignoreIfNotExists.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DeleteFilesParams.java b/java/org/eclipse/lsp4j/DeleteFilesParams.java
new file mode 100644
index 0000000..aa9b9da
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DeleteFilesParams.java
@@ -0,0 +1,90 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.lsp4j.FileDelete;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The parameters sent in notifications/requests for user-initiated deletes
+ * of files.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class DeleteFilesParams {
+ /**
+ * An array of all files/folders deleted in this operation.
+ */
+ @NonNull
+ private List<FileDelete> files = new ArrayList<FileDelete>();
+
+ public DeleteFilesParams() {
+ }
+
+ public DeleteFilesParams(@NonNull final List<FileDelete> files) {
+ this.files = Preconditions.<List<FileDelete>>checkNotNull(files, "files");
+ }
+
+ /**
+ * An array of all files/folders deleted in this operation.
+ */
+ @Pure
+ @NonNull
+ public List<FileDelete> getFiles() {
+ return this.files;
+ }
+
+ /**
+ * An array of all files/folders deleted in this operation.
+ */
+ public void setFiles(@NonNull final List<FileDelete> files) {
+ this.files = Preconditions.checkNotNull(files, "files");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("files", this.files);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DeleteFilesParams other = (DeleteFilesParams) obj;
+ if (this.files == null) {
+ if (other.files != null)
+ return false;
+ } else if (!this.files.equals(other.files))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.files== null) ? 0 : this.files.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/Diagnostic.java b/java/org/eclipse/lsp4j/Diagnostic.java
new file mode 100644
index 0000000..cf2c396
--- /dev/null
+++ b/java/org/eclipse/lsp4j/Diagnostic.java
@@ -0,0 +1,375 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import com.google.gson.annotations.JsonAdapter;
+import java.util.List;
+import org.eclipse.lsp4j.DiagnosticCodeDescription;
+import org.eclipse.lsp4j.DiagnosticRelatedInformation;
+import org.eclipse.lsp4j.DiagnosticSeverity;
+import org.eclipse.lsp4j.DiagnosticTag;
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.jsonrpc.json.adapters.JsonElementTypeAdapter;
+import org.eclipse.lsp4j.jsonrpc.messages.Either;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource.
+ */
+@SuppressWarnings("all")
+public class Diagnostic {
+ /**
+ * The range at which the message applies
+ */
+ @NonNull
+ private Range range;
+
+ /**
+ * The diagnostic's severity. Can be omitted. If omitted it is up to the client to interpret diagnostics as error,
+ * warning, info or hint.
+ */
+ private DiagnosticSeverity severity;
+
+ /**
+ * The diagnostic's code. Can be omitted.
+ */
+ private Either<String, Integer> code;
+
+ /**
+ * An optional property to describe the error code.
+ * <p>
+ * Since 3.16.0
+ */
+ private DiagnosticCodeDescription codeDescription;
+
+ /**
+ * A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.
+ */
+ private String source;
+
+ /**
+ * The diagnostic's message.
+ */
+ @NonNull
+ private String message;
+
+ /**
+ * Additional metadata about the diagnostic.
+ * <p>
+ * Since 3.15.0
+ */
+ private List<DiagnosticTag> tags;
+
+ /**
+ * An array of related diagnostic information, e.g. when symbol-names within a scope collide
+ * all definitions can be marked via this property.
+ * <p>
+ * Since 3.7.0
+ */
+ private List<DiagnosticRelatedInformation> relatedInformation;
+
+ /**
+ * A data entry field that is preserved between a `textDocument/publishDiagnostics`
+ * notification and `textDocument/codeAction` request.
+ * <p>
+ * Since 3.16.0
+ */
+ @JsonAdapter(JsonElementTypeAdapter.Factory.class)
+ private Object data;
+
+ public Diagnostic() {
+ }
+
+ public Diagnostic(@NonNull final Range range, @NonNull final String message) {
+ this.range = Preconditions.<Range>checkNotNull(range, "range");
+ this.message = Preconditions.<String>checkNotNull(message, "message");
+ }
+
+ public Diagnostic(@NonNull final Range range, @NonNull final String message, final DiagnosticSeverity severity, final String source) {
+ this(range, message);
+ this.severity = severity;
+ this.source = source;
+ }
+
+ public Diagnostic(@NonNull final Range range, @NonNull final String message, final DiagnosticSeverity severity, final String source, final String code) {
+ this(range, message, severity, source);
+ this.setCode(code);
+ }
+
+ /**
+ * The range at which the message applies
+ */
+ @Pure
+ @NonNull
+ public Range getRange() {
+ return this.range;
+ }
+
+ /**
+ * The range at which the message applies
+ */
+ public void setRange(@NonNull final Range range) {
+ this.range = Preconditions.checkNotNull(range, "range");
+ }
+
+ /**
+ * The diagnostic's severity. Can be omitted. If omitted it is up to the client to interpret diagnostics as error,
+ * warning, info or hint.
+ */
+ @Pure
+ public DiagnosticSeverity getSeverity() {
+ return this.severity;
+ }
+
+ /**
+ * The diagnostic's severity. Can be omitted. If omitted it is up to the client to interpret diagnostics as error,
+ * warning, info or hint.
+ */
+ public void setSeverity(final DiagnosticSeverity severity) {
+ this.severity = severity;
+ }
+
+ /**
+ * The diagnostic's code. Can be omitted.
+ */
+ @Pure
+ public Either<String, Integer> getCode() {
+ return this.code;
+ }
+
+ /**
+ * The diagnostic's code. Can be omitted.
+ */
+ public void setCode(final Either<String, Integer> code) {
+ this.code = code;
+ }
+
+ public void setCode(final String code) {
+ if (code == null) {
+ this.code = null;
+ return;
+ }
+ this.code = Either.forLeft(code);
+ }
+
+ public void setCode(final Integer code) {
+ if (code == null) {
+ this.code = null;
+ return;
+ }
+ this.code = Either.forRight(code);
+ }
+
+ /**
+ * An optional property to describe the error code.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public DiagnosticCodeDescription getCodeDescription() {
+ return this.codeDescription;
+ }
+
+ /**
+ * An optional property to describe the error code.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setCodeDescription(final DiagnosticCodeDescription codeDescription) {
+ this.codeDescription = codeDescription;
+ }
+
+ /**
+ * A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.
+ */
+ @Pure
+ public String getSource() {
+ return this.source;
+ }
+
+ /**
+ * A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.
+ */
+ public void setSource(final String source) {
+ this.source = source;
+ }
+
+ /**
+ * The diagnostic's message.
+ */
+ @Pure
+ @NonNull
+ public String getMessage() {
+ return this.message;
+ }
+
+ /**
+ * The diagnostic's message.
+ */
+ public void setMessage(@NonNull final String message) {
+ this.message = Preconditions.checkNotNull(message, "message");
+ }
+
+ /**
+ * Additional metadata about the diagnostic.
+ * <p>
+ * Since 3.15.0
+ */
+ @Pure
+ public List<DiagnosticTag> getTags() {
+ return this.tags;
+ }
+
+ /**
+ * Additional metadata about the diagnostic.
+ * <p>
+ * Since 3.15.0
+ */
+ public void setTags(final List<DiagnosticTag> tags) {
+ this.tags = tags;
+ }
+
+ /**
+ * An array of related diagnostic information, e.g. when symbol-names within a scope collide
+ * all definitions can be marked via this property.
+ * <p>
+ * Since 3.7.0
+ */
+ @Pure
+ public List<DiagnosticRelatedInformation> getRelatedInformation() {
+ return this.relatedInformation;
+ }
+
+ /**
+ * An array of related diagnostic information, e.g. when symbol-names within a scope collide
+ * all definitions can be marked via this property.
+ * <p>
+ * Since 3.7.0
+ */
+ public void setRelatedInformation(final List<DiagnosticRelatedInformation> relatedInformation) {
+ this.relatedInformation = relatedInformation;
+ }
+
+ /**
+ * A data entry field that is preserved between a `textDocument/publishDiagnostics`
+ * notification and `textDocument/codeAction` request.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public Object getData() {
+ return this.data;
+ }
+
+ /**
+ * A data entry field that is preserved between a `textDocument/publishDiagnostics`
+ * notification and `textDocument/codeAction` request.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setData(final Object data) {
+ this.data = data;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("range", this.range);
+ b.add("severity", this.severity);
+ b.add("code", this.code);
+ b.add("codeDescription", this.codeDescription);
+ b.add("source", this.source);
+ b.add("message", this.message);
+ b.add("tags", this.tags);
+ b.add("relatedInformation", this.relatedInformation);
+ b.add("data", this.data);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Diagnostic other = (Diagnostic) obj;
+ if (this.range == null) {
+ if (other.range != null)
+ return false;
+ } else if (!this.range.equals(other.range))
+ return false;
+ if (this.severity == null) {
+ if (other.severity != null)
+ return false;
+ } else if (!this.severity.equals(other.severity))
+ return false;
+ if (this.code == null) {
+ if (other.code != null)
+ return false;
+ } else if (!this.code.equals(other.code))
+ return false;
+ if (this.codeDescription == null) {
+ if (other.codeDescription != null)
+ return false;
+ } else if (!this.codeDescription.equals(other.codeDescription))
+ return false;
+ if (this.source == null) {
+ if (other.source != null)
+ return false;
+ } else if (!this.source.equals(other.source))
+ return false;
+ if (this.message == null) {
+ if (other.message != null)
+ return false;
+ } else if (!this.message.equals(other.message))
+ return false;
+ if (this.tags == null) {
+ if (other.tags != null)
+ return false;
+ } else if (!this.tags.equals(other.tags))
+ return false;
+ if (this.relatedInformation == null) {
+ if (other.relatedInformation != null)
+ return false;
+ } else if (!this.relatedInformation.equals(other.relatedInformation))
+ return false;
+ if (this.data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!this.data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.range== null) ? 0 : this.range.hashCode());
+ result = prime * result + ((this.severity== null) ? 0 : this.severity.hashCode());
+ result = prime * result + ((this.code== null) ? 0 : this.code.hashCode());
+ result = prime * result + ((this.codeDescription== null) ? 0 : this.codeDescription.hashCode());
+ result = prime * result + ((this.source== null) ? 0 : this.source.hashCode());
+ result = prime * result + ((this.message== null) ? 0 : this.message.hashCode());
+ result = prime * result + ((this.tags== null) ? 0 : this.tags.hashCode());
+ result = prime * result + ((this.relatedInformation== null) ? 0 : this.relatedInformation.hashCode());
+ return prime * result + ((this.data== null) ? 0 : this.data.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DiagnosticCodeDescription.java b/java/org/eclipse/lsp4j/DiagnosticCodeDescription.java
new file mode 100644
index 0000000..8b52598
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DiagnosticCodeDescription.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Structure to capture a description for an error code.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class DiagnosticCodeDescription {
+ /**
+ * A URI to open with more information about the diagnostic error.
+ */
+ @NonNull
+ private String href;
+
+ public DiagnosticCodeDescription() {
+ }
+
+ public DiagnosticCodeDescription(@NonNull final String href) {
+ this.href = Preconditions.<String>checkNotNull(href, "href");
+ }
+
+ /**
+ * A URI to open with more information about the diagnostic error.
+ */
+ @Pure
+ @NonNull
+ public String getHref() {
+ return this.href;
+ }
+
+ /**
+ * A URI to open with more information about the diagnostic error.
+ */
+ public void setHref(@NonNull final String href) {
+ this.href = Preconditions.checkNotNull(href, "href");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("href", this.href);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DiagnosticCodeDescription other = (DiagnosticCodeDescription) obj;
+ if (this.href == null) {
+ if (other.href != null)
+ return false;
+ } else if (!this.href.equals(other.href))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.href== null) ? 0 : this.href.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DiagnosticRelatedInformation.java b/java/org/eclipse/lsp4j/DiagnosticRelatedInformation.java
new file mode 100644
index 0000000..5d0dea1
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DiagnosticRelatedInformation.java
@@ -0,0 +1,121 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.Location;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Represents a related message and source code location for a diagnostic. This should be
+ * used to point to code locations that cause or related to a diagnostics, e.g when duplicating
+ * a symbol in a scope.
+ * <p>
+ * Since 3.7.0
+ */
+@SuppressWarnings("all")
+public class DiagnosticRelatedInformation {
+ /**
+ * The location of this related diagnostic information.
+ */
+ @NonNull
+ private Location location;
+
+ /**
+ * The message of this related diagnostic information.
+ */
+ @NonNull
+ private String message;
+
+ public DiagnosticRelatedInformation() {
+ }
+
+ public DiagnosticRelatedInformation(@NonNull final Location location, @NonNull final String message) {
+ this.location = Preconditions.<Location>checkNotNull(location, "location");
+ this.message = Preconditions.<String>checkNotNull(message, "message");
+ }
+
+ /**
+ * The location of this related diagnostic information.
+ */
+ @Pure
+ @NonNull
+ public Location getLocation() {
+ return this.location;
+ }
+
+ /**
+ * The location of this related diagnostic information.
+ */
+ public void setLocation(@NonNull final Location location) {
+ this.location = Preconditions.checkNotNull(location, "location");
+ }
+
+ /**
+ * The message of this related diagnostic information.
+ */
+ @Pure
+ @NonNull
+ public String getMessage() {
+ return this.message;
+ }
+
+ /**
+ * The message of this related diagnostic information.
+ */
+ public void setMessage(@NonNull final String message) {
+ this.message = Preconditions.checkNotNull(message, "message");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("location", this.location);
+ b.add("message", this.message);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DiagnosticRelatedInformation other = (DiagnosticRelatedInformation) obj;
+ if (this.location == null) {
+ if (other.location != null)
+ return false;
+ } else if (!this.location.equals(other.location))
+ return false;
+ if (this.message == null) {
+ if (other.message != null)
+ return false;
+ } else if (!this.message.equals(other.message))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.location== null) ? 0 : this.location.hashCode());
+ return prime * result + ((this.message== null) ? 0 : this.message.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DiagnosticSeverity.java b/java/org/eclipse/lsp4j/DiagnosticSeverity.java
new file mode 100644
index 0000000..4e57b3c
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DiagnosticSeverity.java
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * Copyright (c) 2016 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ ******************************************************************************/
+package org.eclipse.lsp4j;
+
+public enum DiagnosticSeverity {
+
+ /**
+ * Reports an error.
+ */
+ Error(1),
+
+ /**
+ * Reports a warning.
+ */
+ Warning(2),
+
+ /**
+ * Reports an information.
+ */
+ Information(3),
+
+ /**
+ * Reports a hint.
+ */
+ Hint(4);
+
+ private final int value;
+
+ DiagnosticSeverity(int value) {
+ this.value = value;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+ public static DiagnosticSeverity forValue(int value) {
+ DiagnosticSeverity[] allValues = DiagnosticSeverity.values();
+ if (value < 1 || value > allValues.length)
+ throw new IllegalArgumentException("Illegal enum value: " + value);
+ return allValues[value - 1];
+ }
+
+}
diff --git a/java/org/eclipse/lsp4j/DiagnosticTag.java b/java/org/eclipse/lsp4j/DiagnosticTag.java
new file mode 100644
index 0000000..f205e77
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DiagnosticTag.java
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * Copyright (c) 2019 Microsoft.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ ******************************************************************************/
+
+package org.eclipse.lsp4j;
+
+/**
+ * The diagnostic tags.
+ *
+ * Since 3.15.0
+ */
+public enum DiagnosticTag {
+
+ /**
+ * Unused or unnecessary code.
+ *
+ * Clients are allowed to render diagnostics with this tag faded out instead of having
+ * an error squiggle.
+ */
+ Unnecessary(1),
+
+ /**
+ * Deprecated or obsolete code.
+ *
+ * Clients are allowed to rendered diagnostics with this tag strike through.
+ */
+ Deprecated(2);
+
+ private final int value;
+
+ DiagnosticTag(int value) {
+ this.value = value;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+ public static DiagnosticTag forValue(int value) {
+ DiagnosticTag[] allValues = DiagnosticTag.values();
+ if (value < 1 || value > allValues.length)
+ throw new IllegalArgumentException("Illegal enum value: " + value);
+ return allValues[value - 1];
+ }
+}
\ No newline at end of file
diff --git a/java/org/eclipse/lsp4j/DiagnosticsTagSupport.java b/java/org/eclipse/lsp4j/DiagnosticsTagSupport.java
new file mode 100644
index 0000000..e580ea6
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DiagnosticsTagSupport.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.lsp4j.DiagnosticTag;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class DiagnosticsTagSupport {
+ /**
+ * The tags supported by the client.
+ */
+ @NonNull
+ private List<DiagnosticTag> valueSet;
+
+ public DiagnosticsTagSupport() {
+ ArrayList<DiagnosticTag> _arrayList = new ArrayList<DiagnosticTag>();
+ this.valueSet = _arrayList;
+ }
+
+ public DiagnosticsTagSupport(@NonNull final List<DiagnosticTag> valueSet) {
+ this.valueSet = Preconditions.<List<DiagnosticTag>>checkNotNull(valueSet, "valueSet");
+ }
+
+ /**
+ * The tags supported by the client.
+ */
+ @Pure
+ @NonNull
+ public List<DiagnosticTag> getValueSet() {
+ return this.valueSet;
+ }
+
+ /**
+ * The tags supported by the client.
+ */
+ public void setValueSet(@NonNull final List<DiagnosticTag> valueSet) {
+ this.valueSet = Preconditions.checkNotNull(valueSet, "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;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DiagnosticsTagSupport other = (DiagnosticsTagSupport) obj;
+ if (this.valueSet == null) {
+ if (other.valueSet != null)
+ return false;
+ } else if (!this.valueSet.equals(other.valueSet))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.valueSet== null) ? 0 : this.valueSet.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DidChangeConfigurationCapabilities.java b/java/org/eclipse/lsp4j/DidChangeConfigurationCapabilities.java
new file mode 100644
index 0000000..59a8a91
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DidChangeConfigurationCapabilities.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Capabilities specific to the `workspace/didChangeConfiguration` notification.
+ */
+@SuppressWarnings("all")
+public class DidChangeConfigurationCapabilities extends DynamicRegistrationCapabilities {
+ public DidChangeConfigurationCapabilities() {
+ }
+
+ public DidChangeConfigurationCapabilities(final Boolean dynamicRegistration) {
+ super(dynamicRegistration);
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("dynamicRegistration", getDynamicRegistration());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DidChangeConfigurationParams.java b/java/org/eclipse/lsp4j/DidChangeConfigurationParams.java
new file mode 100644
index 0000000..fc1121f
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DidChangeConfigurationParams.java
@@ -0,0 +1,87 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import com.google.gson.annotations.JsonAdapter;
+import org.eclipse.lsp4j.jsonrpc.json.adapters.JsonElementTypeAdapter;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * A notification sent from the client to the server to signal the change of configuration settings.
+ */
+@SuppressWarnings("all")
+public class DidChangeConfigurationParams {
+ /**
+ * The actual changed settings.
+ */
+ @NonNull
+ @JsonAdapter(JsonElementTypeAdapter.Factory.class)
+ private Object settings;
+
+ public DidChangeConfigurationParams() {
+ }
+
+ public DidChangeConfigurationParams(@NonNull final Object settings) {
+ this.settings = Preconditions.<Object>checkNotNull(settings, "settings");
+ }
+
+ /**
+ * The actual changed settings.
+ */
+ @Pure
+ @NonNull
+ public Object getSettings() {
+ return this.settings;
+ }
+
+ /**
+ * The actual changed settings.
+ */
+ public void setSettings(@NonNull final Object settings) {
+ this.settings = Preconditions.checkNotNull(settings, "settings");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("settings", this.settings);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DidChangeConfigurationParams other = (DidChangeConfigurationParams) obj;
+ if (this.settings == null) {
+ if (other.settings != null)
+ return false;
+ } else if (!this.settings.equals(other.settings))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.settings== null) ? 0 : this.settings.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DidChangeTextDocumentParams.java b/java/org/eclipse/lsp4j/DidChangeTextDocumentParams.java
new file mode 100644
index 0000000..a1741d7
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DidChangeTextDocumentParams.java
@@ -0,0 +1,159 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.lsp4j.TextDocumentContentChangeEvent;
+import org.eclipse.lsp4j.VersionedTextDocumentIdentifier;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The document change notification is sent from the client to the server to signal changes to a text document.
+ */
+@SuppressWarnings("all")
+public class DidChangeTextDocumentParams {
+ /**
+ * The document that did change. The version number points to the version after all provided content changes have
+ * been applied.
+ */
+ @NonNull
+ private VersionedTextDocumentIdentifier textDocument;
+
+ /**
+ * Legacy property to support protocol version 1.0 requests.
+ */
+ @Deprecated
+ private String uri;
+
+ /**
+ * The actual content changes.
+ */
+ @NonNull
+ private List<TextDocumentContentChangeEvent> contentChanges = new ArrayList<TextDocumentContentChangeEvent>();
+
+ public DidChangeTextDocumentParams() {
+ }
+
+ public DidChangeTextDocumentParams(@NonNull final VersionedTextDocumentIdentifier textDocument, @NonNull final List<TextDocumentContentChangeEvent> contentChanges) {
+ this.textDocument = Preconditions.<VersionedTextDocumentIdentifier>checkNotNull(textDocument, "textDocument");
+ this.contentChanges = Preconditions.<List<TextDocumentContentChangeEvent>>checkNotNull(contentChanges, "contentChanges");
+ }
+
+ @Deprecated
+ public DidChangeTextDocumentParams(@NonNull final VersionedTextDocumentIdentifier textDocument, final String uri, @NonNull final List<TextDocumentContentChangeEvent> contentChanges) {
+ this(textDocument, contentChanges);
+ this.uri = uri;
+ }
+
+ /**
+ * The document that did change. The version number points to the version after all provided content changes have
+ * been applied.
+ */
+ @Pure
+ @NonNull
+ public VersionedTextDocumentIdentifier getTextDocument() {
+ return this.textDocument;
+ }
+
+ /**
+ * The document that did change. The version number points to the version after all provided content changes have
+ * been applied.
+ */
+ public void setTextDocument(@NonNull final VersionedTextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.checkNotNull(textDocument, "textDocument");
+ }
+
+ /**
+ * Legacy property to support protocol version 1.0 requests.
+ */
+ @Pure
+ @Deprecated
+ public String getUri() {
+ return this.uri;
+ }
+
+ /**
+ * Legacy property to support protocol version 1.0 requests.
+ */
+ @Deprecated
+ public void setUri(final String uri) {
+ this.uri = uri;
+ }
+
+ /**
+ * The actual content changes.
+ */
+ @Pure
+ @NonNull
+ public List<TextDocumentContentChangeEvent> getContentChanges() {
+ return this.contentChanges;
+ }
+
+ /**
+ * The actual content changes.
+ */
+ public void setContentChanges(@NonNull final List<TextDocumentContentChangeEvent> contentChanges) {
+ this.contentChanges = Preconditions.checkNotNull(contentChanges, "contentChanges");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("textDocument", this.textDocument);
+ b.add("uri", this.uri);
+ b.add("contentChanges", this.contentChanges);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DidChangeTextDocumentParams other = (DidChangeTextDocumentParams) obj;
+ if (this.textDocument == null) {
+ if (other.textDocument != null)
+ return false;
+ } else if (!this.textDocument.equals(other.textDocument))
+ return false;
+ if (this.uri == null) {
+ if (other.uri != null)
+ return false;
+ } else if (!this.uri.equals(other.uri))
+ return false;
+ if (this.contentChanges == null) {
+ if (other.contentChanges != null)
+ return false;
+ } else if (!this.contentChanges.equals(other.contentChanges))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());
+ result = prime * result + ((this.uri== null) ? 0 : this.uri.hashCode());
+ return prime * result + ((this.contentChanges== null) ? 0 : this.contentChanges.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DidChangeWatchedFilesCapabilities.java b/java/org/eclipse/lsp4j/DidChangeWatchedFilesCapabilities.java
new file mode 100644
index 0000000..1e78628
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DidChangeWatchedFilesCapabilities.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
+ */
+@SuppressWarnings("all")
+public class DidChangeWatchedFilesCapabilities extends DynamicRegistrationCapabilities {
+ public DidChangeWatchedFilesCapabilities() {
+ }
+
+ public DidChangeWatchedFilesCapabilities(final Boolean dynamicRegistration) {
+ super(dynamicRegistration);
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("dynamicRegistration", getDynamicRegistration());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DidChangeWatchedFilesParams.java b/java/org/eclipse/lsp4j/DidChangeWatchedFilesParams.java
new file mode 100644
index 0000000..1d442e6
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DidChangeWatchedFilesParams.java
@@ -0,0 +1,89 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.lsp4j.FileEvent;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The watched files notification is sent from the client to the server when the client detects changes
+ * to file watched by the language client.
+ */
+@SuppressWarnings("all")
+public class DidChangeWatchedFilesParams {
+ /**
+ * The actual file events.
+ */
+ @NonNull
+ private List<FileEvent> changes;
+
+ public DidChangeWatchedFilesParams() {
+ this(new ArrayList<FileEvent>());
+ }
+
+ public DidChangeWatchedFilesParams(@NonNull final List<FileEvent> changes) {
+ this.changes = Preconditions.<List<FileEvent>>checkNotNull(changes, "changes");
+ }
+
+ /**
+ * The actual file events.
+ */
+ @Pure
+ @NonNull
+ public List<FileEvent> getChanges() {
+ return this.changes;
+ }
+
+ /**
+ * The actual file events.
+ */
+ public void setChanges(@NonNull final List<FileEvent> changes) {
+ this.changes = Preconditions.checkNotNull(changes, "changes");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("changes", this.changes);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DidChangeWatchedFilesParams other = (DidChangeWatchedFilesParams) obj;
+ if (this.changes == null) {
+ if (other.changes != null)
+ return false;
+ } else if (!this.changes.equals(other.changes))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.changes== null) ? 0 : this.changes.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DidChangeWatchedFilesRegistrationOptions.java b/java/org/eclipse/lsp4j/DidChangeWatchedFilesRegistrationOptions.java
new file mode 100644
index 0000000..ba37cfa
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DidChangeWatchedFilesRegistrationOptions.java
@@ -0,0 +1,83 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.FileSystemWatcher;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class DidChangeWatchedFilesRegistrationOptions {
+ /**
+ * The watchers to register.
+ */
+ @NonNull
+ private List<FileSystemWatcher> watchers;
+
+ public DidChangeWatchedFilesRegistrationOptions() {
+ }
+
+ public DidChangeWatchedFilesRegistrationOptions(@NonNull final List<FileSystemWatcher> watchers) {
+ this.watchers = Preconditions.<List<FileSystemWatcher>>checkNotNull(watchers, "watchers");
+ }
+
+ /**
+ * The watchers to register.
+ */
+ @Pure
+ @NonNull
+ public List<FileSystemWatcher> getWatchers() {
+ return this.watchers;
+ }
+
+ /**
+ * The watchers to register.
+ */
+ public void setWatchers(@NonNull final List<FileSystemWatcher> watchers) {
+ this.watchers = Preconditions.checkNotNull(watchers, "watchers");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("watchers", this.watchers);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DidChangeWatchedFilesRegistrationOptions other = (DidChangeWatchedFilesRegistrationOptions) obj;
+ if (this.watchers == null) {
+ if (other.watchers != null)
+ return false;
+ } else if (!this.watchers.equals(other.watchers))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.watchers== null) ? 0 : this.watchers.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DidChangeWorkspaceFoldersParams.java b/java/org/eclipse/lsp4j/DidChangeWorkspaceFoldersParams.java
new file mode 100644
index 0000000..a071529
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DidChangeWorkspaceFoldersParams.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.WorkspaceFoldersChangeEvent;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The workspace/didChangeWorkspaceFolders notification is sent from the client to the server to
+ * inform the server about workspace folder configuration changes. The notification is sent by
+ * default if both ServerCapabilities/workspace/workspaceFolders and
+ * ClientCapabilities/workspace/workspaceFolders are true; or if the server has registered to
+ * receive this notification it first.
+ * <p>
+ * Since 3.6.0
+ */
+@SuppressWarnings("all")
+public class DidChangeWorkspaceFoldersParams {
+ /**
+ * The actual workspace folder change event.
+ */
+ @NonNull
+ private WorkspaceFoldersChangeEvent event;
+
+ public DidChangeWorkspaceFoldersParams() {
+ }
+
+ public DidChangeWorkspaceFoldersParams(@NonNull final WorkspaceFoldersChangeEvent event) {
+ this.event = Preconditions.<WorkspaceFoldersChangeEvent>checkNotNull(event, "event");
+ }
+
+ /**
+ * The actual workspace folder change event.
+ */
+ @Pure
+ @NonNull
+ public WorkspaceFoldersChangeEvent getEvent() {
+ return this.event;
+ }
+
+ /**
+ * The actual workspace folder change event.
+ */
+ public void setEvent(@NonNull final WorkspaceFoldersChangeEvent event) {
+ this.event = Preconditions.checkNotNull(event, "event");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("event", this.event);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DidChangeWorkspaceFoldersParams other = (DidChangeWorkspaceFoldersParams) obj;
+ if (this.event == null) {
+ if (other.event != null)
+ return false;
+ } else if (!this.event.equals(other.event))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.event== null) ? 0 : this.event.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DidCloseTextDocumentParams.java b/java/org/eclipse/lsp4j/DidCloseTextDocumentParams.java
new file mode 100644
index 0000000..5bae096
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DidCloseTextDocumentParams.java
@@ -0,0 +1,87 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The document close notification is sent from the client to the server when the document got closed in the client.
+ * The document's truth now exists where the document's uri points to (e.g. if the document's uri is a file uri the
+ * truth now exists on disk).
+ */
+@SuppressWarnings("all")
+public class DidCloseTextDocumentParams {
+ /**
+ * The document that was closed.
+ */
+ @NonNull
+ private TextDocumentIdentifier textDocument;
+
+ public DidCloseTextDocumentParams() {
+ }
+
+ public DidCloseTextDocumentParams(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.<TextDocumentIdentifier>checkNotNull(textDocument, "textDocument");
+ }
+
+ /**
+ * The document that was closed.
+ */
+ @Pure
+ @NonNull
+ public TextDocumentIdentifier getTextDocument() {
+ return this.textDocument;
+ }
+
+ /**
+ * The document that was closed.
+ */
+ public void setTextDocument(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.checkNotNull(textDocument, "textDocument");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("textDocument", this.textDocument);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DidCloseTextDocumentParams other = (DidCloseTextDocumentParams) obj;
+ if (this.textDocument == null) {
+ if (other.textDocument != null)
+ return false;
+ } else if (!this.textDocument.equals(other.textDocument))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DidOpenTextDocumentParams.java b/java/org/eclipse/lsp4j/DidOpenTextDocumentParams.java
new file mode 100644
index 0000000..b1a8565
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DidOpenTextDocumentParams.java
@@ -0,0 +1,125 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.TextDocumentItem;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The document open notification is sent from the client to the server to signal newly opened text documents.
+ * The document's truth is now managed by the client and the server must not try to read the document's truth using
+ * the document's uri.
+ */
+@SuppressWarnings("all")
+public class DidOpenTextDocumentParams {
+ /**
+ * The document that was opened.
+ */
+ @NonNull
+ private TextDocumentItem textDocument;
+
+ /**
+ * Legacy property to support protocol version 1.0 requests.
+ */
+ @Deprecated
+ private String text;
+
+ public DidOpenTextDocumentParams() {
+ }
+
+ public DidOpenTextDocumentParams(@NonNull final TextDocumentItem textDocument) {
+ this.textDocument = Preconditions.<TextDocumentItem>checkNotNull(textDocument, "textDocument");
+ }
+
+ @Deprecated
+ public DidOpenTextDocumentParams(@NonNull final TextDocumentItem textDocument, final String text) {
+ this(textDocument);
+ this.text = text;
+ }
+
+ /**
+ * The document that was opened.
+ */
+ @Pure
+ @NonNull
+ public TextDocumentItem getTextDocument() {
+ return this.textDocument;
+ }
+
+ /**
+ * The document that was opened.
+ */
+ public void setTextDocument(@NonNull final TextDocumentItem textDocument) {
+ this.textDocument = Preconditions.checkNotNull(textDocument, "textDocument");
+ }
+
+ /**
+ * Legacy property to support protocol version 1.0 requests.
+ */
+ @Pure
+ @Deprecated
+ public String getText() {
+ return this.text;
+ }
+
+ /**
+ * Legacy property to support protocol version 1.0 requests.
+ */
+ @Deprecated
+ public void setText(final String text) {
+ this.text = text;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("textDocument", this.textDocument);
+ b.add("text", this.text);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DidOpenTextDocumentParams other = (DidOpenTextDocumentParams) obj;
+ if (this.textDocument == null) {
+ if (other.textDocument != null)
+ return false;
+ } else if (!this.textDocument.equals(other.textDocument))
+ return false;
+ if (this.text == null) {
+ if (other.text != null)
+ return false;
+ } else if (!this.text.equals(other.text))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());
+ return prime * result + ((this.text== null) ? 0 : this.text.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DidSaveTextDocumentParams.java b/java/org/eclipse/lsp4j/DidSaveTextDocumentParams.java
new file mode 100644
index 0000000..8dbf122
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DidSaveTextDocumentParams.java
@@ -0,0 +1,122 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The document save notification is sent from the client to the server when the document was saved in the client.
+ */
+@SuppressWarnings("all")
+public class DidSaveTextDocumentParams {
+ /**
+ * The document that was closed.
+ */
+ @NonNull
+ private TextDocumentIdentifier textDocument;
+
+ /**
+ * Optional the content when saved. Depends on the includeText value
+ * when the save notification was requested.
+ */
+ private String text;
+
+ public DidSaveTextDocumentParams() {
+ }
+
+ public DidSaveTextDocumentParams(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.<TextDocumentIdentifier>checkNotNull(textDocument, "textDocument");
+ }
+
+ public DidSaveTextDocumentParams(@NonNull final TextDocumentIdentifier textDocument, final String text) {
+ this(textDocument);
+ this.text = text;
+ }
+
+ /**
+ * The document that was closed.
+ */
+ @Pure
+ @NonNull
+ public TextDocumentIdentifier getTextDocument() {
+ return this.textDocument;
+ }
+
+ /**
+ * The document that was closed.
+ */
+ public void setTextDocument(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.checkNotNull(textDocument, "textDocument");
+ }
+
+ /**
+ * Optional the content when saved. Depends on the includeText value
+ * when the save notification was requested.
+ */
+ @Pure
+ public String getText() {
+ return this.text;
+ }
+
+ /**
+ * Optional the content when saved. Depends on the includeText value
+ * when the save notification was requested.
+ */
+ public void setText(final String text) {
+ this.text = text;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("textDocument", this.textDocument);
+ b.add("text", this.text);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DidSaveTextDocumentParams other = (DidSaveTextDocumentParams) obj;
+ if (this.textDocument == null) {
+ if (other.textDocument != null)
+ return false;
+ } else if (!this.textDocument.equals(other.textDocument))
+ return false;
+ if (this.text == null) {
+ if (other.text != null)
+ return false;
+ } else if (!this.text.equals(other.text))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());
+ return prime * result + ((this.text== null) ? 0 : this.text.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentColorParams.java b/java/org/eclipse/lsp4j/DocumentColorParams.java
new file mode 100644
index 0000000..45dc221
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentColorParams.java
@@ -0,0 +1,93 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.WorkDoneProgressAndPartialResultParams;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The document color request is sent from the client to the server to list all color references
+ * found in a given text document. Along with the range, a color value in RGB is returned.
+ * <p>
+ * Since 3.6.0
+ */
+@SuppressWarnings("all")
+public class DocumentColorParams extends WorkDoneProgressAndPartialResultParams {
+ /**
+ * The text document.
+ */
+ @NonNull
+ private TextDocumentIdentifier textDocument;
+
+ public DocumentColorParams() {
+ }
+
+ public DocumentColorParams(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.<TextDocumentIdentifier>checkNotNull(textDocument, "textDocument");
+ }
+
+ /**
+ * The text document.
+ */
+ @Pure
+ @NonNull
+ public TextDocumentIdentifier getTextDocument() {
+ return this.textDocument;
+ }
+
+ /**
+ * The text document.
+ */
+ public void setTextDocument(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.checkNotNull(textDocument, "textDocument");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("textDocument", this.textDocument);
+ b.add("workDoneToken", getWorkDoneToken());
+ b.add("partialResultToken", getPartialResultToken());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DocumentColorParams other = (DocumentColorParams) obj;
+ if (this.textDocument == null) {
+ if (other.textDocument != null)
+ return false;
+ } else if (!this.textDocument.equals(other.textDocument))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentFilter.java b/java/org/eclipse/lsp4j/DocumentFilter.java
new file mode 100644
index 0000000..c1fc34b
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentFilter.java
@@ -0,0 +1,138 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * A document filter denotes a document through properties like language, schema or pattern.
+ */
+@SuppressWarnings("all")
+public class DocumentFilter {
+ /**
+ * A language id, like `typescript`.
+ */
+ private String language;
+
+ /**
+ * A uri scheme, like `file` or `untitled`.
+ */
+ private String scheme;
+
+ /**
+ * A glob pattern, like `*.{ts,js}`.
+ */
+ private String pattern;
+
+ public DocumentFilter() {
+ }
+
+ public DocumentFilter(final String language, final String scheme, final String pattern) {
+ this.language = language;
+ this.scheme = scheme;
+ this.pattern = pattern;
+ }
+
+ /**
+ * A language id, like `typescript`.
+ */
+ @Pure
+ public String getLanguage() {
+ return this.language;
+ }
+
+ /**
+ * A language id, like `typescript`.
+ */
+ public void setLanguage(final String language) {
+ this.language = language;
+ }
+
+ /**
+ * A uri scheme, like `file` or `untitled`.
+ */
+ @Pure
+ public String getScheme() {
+ return this.scheme;
+ }
+
+ /**
+ * A uri scheme, like `file` or `untitled`.
+ */
+ public void setScheme(final String scheme) {
+ this.scheme = scheme;
+ }
+
+ /**
+ * A glob pattern, like `*.{ts,js}`.
+ */
+ @Pure
+ public String getPattern() {
+ return this.pattern;
+ }
+
+ /**
+ * A glob pattern, like `*.{ts,js}`.
+ */
+ public void setPattern(final String pattern) {
+ this.pattern = pattern;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("language", this.language);
+ b.add("scheme", this.scheme);
+ b.add("pattern", this.pattern);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DocumentFilter other = (DocumentFilter) obj;
+ if (this.language == null) {
+ if (other.language != null)
+ return false;
+ } else if (!this.language.equals(other.language))
+ return false;
+ if (this.scheme == null) {
+ if (other.scheme != null)
+ return false;
+ } else if (!this.scheme.equals(other.scheme))
+ return false;
+ if (this.pattern == null) {
+ if (other.pattern != null)
+ return false;
+ } else if (!this.pattern.equals(other.pattern))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.language== null) ? 0 : this.language.hashCode());
+ result = prime * result + ((this.scheme== null) ? 0 : this.scheme.hashCode());
+ return prime * result + ((this.pattern== null) ? 0 : this.pattern.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentFormattingOptions.java b/java/org/eclipse/lsp4j/DocumentFormattingOptions.java
new file mode 100644
index 0000000..d6f14ad
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentFormattingOptions.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Document formatting options.
+ */
+@SuppressWarnings("all")
+public class DocumentFormattingOptions extends AbstractWorkDoneProgressOptions {
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentFormattingParams.java b/java/org/eclipse/lsp4j/DocumentFormattingParams.java
new file mode 100644
index 0000000..dcc2913
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentFormattingParams.java
@@ -0,0 +1,164 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.FormattingOptions;
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.WorkDoneProgressParams;
+import org.eclipse.lsp4j.jsonrpc.messages.Either;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The document formatting request is sent from the server to the client to format a whole document.
+ */
+@SuppressWarnings("all")
+public class DocumentFormattingParams implements WorkDoneProgressParams {
+ /**
+ * An optional token that a server can use to report work done progress.
+ */
+ private Either<String, Integer> workDoneToken;
+
+ /**
+ * The document to format.
+ */
+ @NonNull
+ private TextDocumentIdentifier textDocument;
+
+ /**
+ * The format options
+ */
+ @NonNull
+ private FormattingOptions options;
+
+ public DocumentFormattingParams() {
+ }
+
+ public DocumentFormattingParams(@NonNull final TextDocumentIdentifier textDocument, @NonNull final FormattingOptions options) {
+ this.textDocument = Preconditions.<TextDocumentIdentifier>checkNotNull(textDocument, "textDocument");
+ this.options = Preconditions.<FormattingOptions>checkNotNull(options, "options");
+ }
+
+ /**
+ * An optional token that a server can use to report work done progress.
+ */
+ @Pure
+ @Override
+ public Either<String, Integer> getWorkDoneToken() {
+ return this.workDoneToken;
+ }
+
+ /**
+ * An optional token that a server can use to report work done progress.
+ */
+ public void setWorkDoneToken(final Either<String, Integer> workDoneToken) {
+ this.workDoneToken = workDoneToken;
+ }
+
+ public void setWorkDoneToken(final String workDoneToken) {
+ if (workDoneToken == null) {
+ this.workDoneToken = null;
+ return;
+ }
+ this.workDoneToken = Either.forLeft(workDoneToken);
+ }
+
+ public void setWorkDoneToken(final Integer workDoneToken) {
+ if (workDoneToken == null) {
+ this.workDoneToken = null;
+ return;
+ }
+ this.workDoneToken = Either.forRight(workDoneToken);
+ }
+
+ /**
+ * The document to format.
+ */
+ @Pure
+ @NonNull
+ public TextDocumentIdentifier getTextDocument() {
+ return this.textDocument;
+ }
+
+ /**
+ * The document to format.
+ */
+ public void setTextDocument(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.checkNotNull(textDocument, "textDocument");
+ }
+
+ /**
+ * The format options
+ */
+ @Pure
+ @NonNull
+ public FormattingOptions getOptions() {
+ return this.options;
+ }
+
+ /**
+ * The format options
+ */
+ public void setOptions(@NonNull final FormattingOptions options) {
+ this.options = Preconditions.checkNotNull(options, "options");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneToken", this.workDoneToken);
+ b.add("textDocument", this.textDocument);
+ b.add("options", this.options);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DocumentFormattingParams other = (DocumentFormattingParams) obj;
+ if (this.workDoneToken == null) {
+ if (other.workDoneToken != null)
+ return false;
+ } else if (!this.workDoneToken.equals(other.workDoneToken))
+ return false;
+ if (this.textDocument == null) {
+ if (other.textDocument != null)
+ return false;
+ } else if (!this.textDocument.equals(other.textDocument))
+ return false;
+ if (this.options == null) {
+ if (other.options != null)
+ return false;
+ } else if (!this.options.equals(other.options))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.workDoneToken== null) ? 0 : this.workDoneToken.hashCode());
+ result = prime * result + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());
+ return prime * result + ((this.options== null) ? 0 : this.options.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentFormattingRegistrationOptions.java b/java/org/eclipse/lsp4j/DocumentFormattingRegistrationOptions.java
new file mode 100644
index 0000000..a9eeb45
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentFormattingRegistrationOptions.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractTextDocumentRegistrationAndWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Document formatting registration options.
+ */
+@SuppressWarnings("all")
+public class DocumentFormattingRegistrationOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions {
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ b.add("documentSelector", getDocumentSelector());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentHighlight.java b/java/org/eclipse/lsp4j/DocumentHighlight.java
new file mode 100644
index 0000000..63bcd3f
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentHighlight.java
@@ -0,0 +1,121 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.DocumentHighlightKind;
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * A document highlight is a range inside a text document which deserves special attention. Usually a document highlight
+ * is visualized by changing the background color of its range.
+ */
+@SuppressWarnings("all")
+public class DocumentHighlight {
+ /**
+ * The range this highlight applies to.
+ */
+ @NonNull
+ private Range range;
+
+ /**
+ * The highlight kind, default is {@link DocumentHighlightKind#Text}.
+ */
+ private DocumentHighlightKind kind;
+
+ public DocumentHighlight() {
+ }
+
+ public DocumentHighlight(@NonNull final Range range) {
+ this.range = Preconditions.<Range>checkNotNull(range, "range");
+ }
+
+ public DocumentHighlight(@NonNull final Range range, final DocumentHighlightKind kind) {
+ this(range);
+ this.kind = kind;
+ }
+
+ /**
+ * The range this highlight applies to.
+ */
+ @Pure
+ @NonNull
+ public Range getRange() {
+ return this.range;
+ }
+
+ /**
+ * The range this highlight applies to.
+ */
+ public void setRange(@NonNull final Range range) {
+ this.range = Preconditions.checkNotNull(range, "range");
+ }
+
+ /**
+ * The highlight kind, default is {@link DocumentHighlightKind#Text}.
+ */
+ @Pure
+ public DocumentHighlightKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * The highlight kind, default is {@link DocumentHighlightKind#Text}.
+ */
+ public void setKind(final DocumentHighlightKind kind) {
+ this.kind = kind;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("range", this.range);
+ b.add("kind", this.kind);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DocumentHighlight other = (DocumentHighlight) obj;
+ if (this.range == null) {
+ if (other.range != null)
+ return false;
+ } else if (!this.range.equals(other.range))
+ return false;
+ if (this.kind == null) {
+ if (other.kind != null)
+ return false;
+ } else if (!this.kind.equals(other.kind))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.range== null) ? 0 : this.range.hashCode());
+ return prime * result + ((this.kind== null) ? 0 : this.kind.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentHighlightCapabilities.java b/java/org/eclipse/lsp4j/DocumentHighlightCapabilities.java
new file mode 100644
index 0000000..0e347b0
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentHighlightCapabilities.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Capabilities specific to the `textDocument/documentHighlight`
+ */
+@SuppressWarnings("all")
+public class DocumentHighlightCapabilities extends DynamicRegistrationCapabilities {
+ public DocumentHighlightCapabilities() {
+ }
+
+ public DocumentHighlightCapabilities(final Boolean dynamicRegistration) {
+ super(dynamicRegistration);
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("dynamicRegistration", getDynamicRegistration());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentHighlightKind.java b/java/org/eclipse/lsp4j/DocumentHighlightKind.java
new file mode 100644
index 0000000..db787ef
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentHighlightKind.java
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * Copyright (c) 2016 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ ******************************************************************************/
+package org.eclipse.lsp4j;
+
+/**
+ * A document highlight kind.
+ */
+public enum DocumentHighlightKind {
+
+ /**
+ * A textual occurrence.
+ */
+ Text(1),
+
+ /**
+ * Read-access of a symbol, like reading a variable.
+ */
+ Read(2),
+
+ /**
+ * Write-access of a symbol, like writing to a variable.
+ */
+ Write(3);
+
+ private final int value;
+
+ DocumentHighlightKind(int value) {
+ this.value = value;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+ public static DocumentHighlightKind forValue(int value) {
+ DocumentHighlightKind[] allValues = DocumentHighlightKind.values();
+ if (value < 1 || value > allValues.length)
+ throw new IllegalArgumentException("Illegal enum value: " + value);
+ return allValues[value - 1];
+ }
+
+}
diff --git a/java/org/eclipse/lsp4j/DocumentHighlightOptions.java b/java/org/eclipse/lsp4j/DocumentHighlightOptions.java
new file mode 100644
index 0000000..ba2f6fb
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentHighlightOptions.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class DocumentHighlightOptions extends AbstractWorkDoneProgressOptions {
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentHighlightParams.java b/java/org/eclipse/lsp4j/DocumentHighlightParams.java
new file mode 100644
index 0000000..ef75886
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentHighlightParams.java
@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.Position;
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.TextDocumentPositionAndWorkDoneProgressAndPartialResultParams;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The document highlight request is sent from the client to the server to resolve a document highlights
+ * for a given text document position.
+ */
+@SuppressWarnings("all")
+public class DocumentHighlightParams extends TextDocumentPositionAndWorkDoneProgressAndPartialResultParams {
+ public DocumentHighlightParams() {
+ }
+
+ public DocumentHighlightParams(@NonNull final TextDocumentIdentifier textDocument, @NonNull final Position position) {
+ super(textDocument, position);
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("partialResultToken", getPartialResultToken());
+ b.add("workDoneToken", getWorkDoneToken());
+ b.add("textDocument", getTextDocument());
+ b.add("uri", getUri());
+ b.add("position", getPosition());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentHighlightRegistrationOptions.java b/java/org/eclipse/lsp4j/DocumentHighlightRegistrationOptions.java
new file mode 100644
index 0000000..885376e
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentHighlightRegistrationOptions.java
@@ -0,0 +1,48 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractTextDocumentRegistrationAndWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class DocumentHighlightRegistrationOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions {
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ b.add("documentSelector", getDocumentSelector());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentLink.java b/java/org/eclipse/lsp4j/DocumentLink.java
new file mode 100644
index 0000000..bf3566e
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentLink.java
@@ -0,0 +1,208 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import com.google.gson.annotations.JsonAdapter;
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.jsonrpc.json.adapters.JsonElementTypeAdapter;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * A document link is a range in a text document that links to an internal or external resource, like another
+ * text document or a web site.
+ */
+@SuppressWarnings("all")
+public class DocumentLink {
+ /**
+ * The range this link applies to.
+ */
+ @NonNull
+ private Range range;
+
+ /**
+ * The uri this link points to. If missing a resolve request is sent later.
+ */
+ private String target;
+
+ /**
+ * The tooltip text when you hover over this link.
+ * <p>
+ * If a tooltip is provided, is will be displayed in a string that includes instructions on how to
+ * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,
+ * user settings, and localization.
+ * <p>
+ * Since 3.15.0
+ */
+ private String tooltip;
+
+ /**
+ * A data entry field that is preserved on a document link between a
+ * DocumentLinkRequest and a DocumentLinkResolveRequest.
+ */
+ @JsonAdapter(JsonElementTypeAdapter.Factory.class)
+ private Object data;
+
+ public DocumentLink() {
+ }
+
+ public DocumentLink(@NonNull final Range range) {
+ this.range = Preconditions.<Range>checkNotNull(range, "range");
+ }
+
+ public DocumentLink(@NonNull final Range range, final String target) {
+ this(range);
+ this.target = target;
+ }
+
+ public DocumentLink(@NonNull final Range range, final String target, final Object data) {
+ this(range, target);
+ this.data = data;
+ }
+
+ public DocumentLink(@NonNull final Range range, final String target, final Object data, final String tooltip) {
+ this(range, target, data);
+ this.tooltip = tooltip;
+ }
+
+ /**
+ * The range this link applies to.
+ */
+ @Pure
+ @NonNull
+ public Range getRange() {
+ return this.range;
+ }
+
+ /**
+ * The range this link applies to.
+ */
+ public void setRange(@NonNull final Range range) {
+ this.range = Preconditions.checkNotNull(range, "range");
+ }
+
+ /**
+ * The uri this link points to. If missing a resolve request is sent later.
+ */
+ @Pure
+ public String getTarget() {
+ return this.target;
+ }
+
+ /**
+ * The uri this link points to. If missing a resolve request is sent later.
+ */
+ public void setTarget(final String target) {
+ this.target = target;
+ }
+
+ /**
+ * The tooltip text when you hover over this link.
+ * <p>
+ * If a tooltip is provided, is will be displayed in a string that includes instructions on how to
+ * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,
+ * user settings, and localization.
+ * <p>
+ * Since 3.15.0
+ */
+ @Pure
+ public String getTooltip() {
+ return this.tooltip;
+ }
+
+ /**
+ * The tooltip text when you hover over this link.
+ * <p>
+ * If a tooltip is provided, is will be displayed in a string that includes instructions on how to
+ * trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,
+ * user settings, and localization.
+ * <p>
+ * Since 3.15.0
+ */
+ public void setTooltip(final String tooltip) {
+ this.tooltip = tooltip;
+ }
+
+ /**
+ * A data entry field that is preserved on a document link between a
+ * DocumentLinkRequest and a DocumentLinkResolveRequest.
+ */
+ @Pure
+ public Object getData() {
+ return this.data;
+ }
+
+ /**
+ * A data entry field that is preserved on a document link between a
+ * DocumentLinkRequest and a DocumentLinkResolveRequest.
+ */
+ public void setData(final Object data) {
+ this.data = data;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("range", this.range);
+ b.add("target", this.target);
+ b.add("tooltip", this.tooltip);
+ b.add("data", this.data);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DocumentLink other = (DocumentLink) obj;
+ if (this.range == null) {
+ if (other.range != null)
+ return false;
+ } else if (!this.range.equals(other.range))
+ return false;
+ if (this.target == null) {
+ if (other.target != null)
+ return false;
+ } else if (!this.target.equals(other.target))
+ return false;
+ if (this.tooltip == null) {
+ if (other.tooltip != null)
+ return false;
+ } else if (!this.tooltip.equals(other.tooltip))
+ return false;
+ if (this.data == null) {
+ if (other.data != null)
+ return false;
+ } else if (!this.data.equals(other.data))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.range== null) ? 0 : this.range.hashCode());
+ result = prime * result + ((this.target== null) ? 0 : this.target.hashCode());
+ result = prime * result + ((this.tooltip== null) ? 0 : this.tooltip.hashCode());
+ return prime * result + ((this.data== null) ? 0 : this.data.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentLinkCapabilities.java b/java/org/eclipse/lsp4j/DocumentLinkCapabilities.java
new file mode 100644
index 0000000..e213bf6
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentLinkCapabilities.java
@@ -0,0 +1,95 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Capabilities specific to the `textDocument/documentLink`
+ */
+@SuppressWarnings("all")
+public class DocumentLinkCapabilities extends DynamicRegistrationCapabilities {
+ /**
+ * Whether the client supports the {@link DocumentLink#tooltip} property.
+ * <p>
+ * Since 3.15.0
+ */
+ private Boolean tooltipSupport;
+
+ public DocumentLinkCapabilities() {
+ }
+
+ public DocumentLinkCapabilities(final Boolean dynamicRegistration) {
+ super(dynamicRegistration);
+ }
+
+ public DocumentLinkCapabilities(final Boolean dynamicRegistration, final Boolean tooltipSupport) {
+ super(dynamicRegistration);
+ this.tooltipSupport = tooltipSupport;
+ }
+
+ /**
+ * Whether the client supports the {@link DocumentLink#tooltip} property.
+ * <p>
+ * Since 3.15.0
+ */
+ @Pure
+ public Boolean getTooltipSupport() {
+ return this.tooltipSupport;
+ }
+
+ /**
+ * Whether the client supports the {@link DocumentLink#tooltip} property.
+ * <p>
+ * Since 3.15.0
+ */
+ public void setTooltipSupport(final Boolean tooltipSupport) {
+ this.tooltipSupport = tooltipSupport;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("tooltipSupport", this.tooltipSupport);
+ b.add("dynamicRegistration", getDynamicRegistration());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DocumentLinkCapabilities other = (DocumentLinkCapabilities) obj;
+ if (this.tooltipSupport == null) {
+ if (other.tooltipSupport != null)
+ return false;
+ } else if (!this.tooltipSupport.equals(other.tooltipSupport))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.tooltipSupport== null) ? 0 : this.tooltipSupport.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentLinkOptions.java b/java/org/eclipse/lsp4j/DocumentLinkOptions.java
new file mode 100644
index 0000000..4e1ff5e
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentLinkOptions.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Document link options
+ */
+@SuppressWarnings("all")
+public class DocumentLinkOptions extends AbstractWorkDoneProgressOptions {
+ /**
+ * Document links have a resolve provider as well.
+ */
+ private Boolean resolveProvider;
+
+ public DocumentLinkOptions() {
+ }
+
+ public DocumentLinkOptions(final Boolean resolveProvider) {
+ this.resolveProvider = resolveProvider;
+ }
+
+ /**
+ * Document links have a resolve provider as well.
+ */
+ @Pure
+ public Boolean getResolveProvider() {
+ return this.resolveProvider;
+ }
+
+ /**
+ * Document links have a resolve provider as well.
+ */
+ public void setResolveProvider(final Boolean resolveProvider) {
+ this.resolveProvider = resolveProvider;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("resolveProvider", this.resolveProvider);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DocumentLinkOptions other = (DocumentLinkOptions) obj;
+ if (this.resolveProvider == null) {
+ if (other.resolveProvider != null)
+ return false;
+ } else if (!this.resolveProvider.equals(other.resolveProvider))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.resolveProvider== null) ? 0 : this.resolveProvider.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentLinkParams.java b/java/org/eclipse/lsp4j/DocumentLinkParams.java
new file mode 100644
index 0000000..f45aafe
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentLinkParams.java
@@ -0,0 +1,90 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.WorkDoneProgressAndPartialResultParams;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The document links request is sent from the client to the server to request the location of links in a document.
+ */
+@SuppressWarnings("all")
+public class DocumentLinkParams extends WorkDoneProgressAndPartialResultParams {
+ /**
+ * The document to provide document links for.
+ */
+ @NonNull
+ private TextDocumentIdentifier textDocument;
+
+ public DocumentLinkParams() {
+ }
+
+ public DocumentLinkParams(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.<TextDocumentIdentifier>checkNotNull(textDocument, "textDocument");
+ }
+
+ /**
+ * The document to provide document links for.
+ */
+ @Pure
+ @NonNull
+ public TextDocumentIdentifier getTextDocument() {
+ return this.textDocument;
+ }
+
+ /**
+ * The document to provide document links for.
+ */
+ public void setTextDocument(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.checkNotNull(textDocument, "textDocument");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("textDocument", this.textDocument);
+ b.add("workDoneToken", getWorkDoneToken());
+ b.add("partialResultToken", getPartialResultToken());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DocumentLinkParams other = (DocumentLinkParams) obj;
+ if (this.textDocument == null) {
+ if (other.textDocument != null)
+ return false;
+ } else if (!this.textDocument.equals(other.textDocument))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentLinkRegistrationOptions.java b/java/org/eclipse/lsp4j/DocumentLinkRegistrationOptions.java
new file mode 100644
index 0000000..97922fc
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentLinkRegistrationOptions.java
@@ -0,0 +1,82 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractTextDocumentRegistrationAndWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class DocumentLinkRegistrationOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions {
+ /**
+ * Document links have a resolve provider as well.
+ */
+ private Boolean resolveProvider;
+
+ public DocumentLinkRegistrationOptions() {
+ }
+
+ public DocumentLinkRegistrationOptions(final Boolean resolveProvider) {
+ this.resolveProvider = resolveProvider;
+ }
+
+ /**
+ * Document links have a resolve provider as well.
+ */
+ @Pure
+ public Boolean getResolveProvider() {
+ return this.resolveProvider;
+ }
+
+ /**
+ * Document links have a resolve provider as well.
+ */
+ public void setResolveProvider(final Boolean resolveProvider) {
+ this.resolveProvider = resolveProvider;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("resolveProvider", this.resolveProvider);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ b.add("documentSelector", getDocumentSelector());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DocumentLinkRegistrationOptions other = (DocumentLinkRegistrationOptions) obj;
+ if (this.resolveProvider == null) {
+ if (other.resolveProvider != null)
+ return false;
+ } else if (!this.resolveProvider.equals(other.resolveProvider))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.resolveProvider== null) ? 0 : this.resolveProvider.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentOnTypeFormattingOptions.java b/java/org/eclipse/lsp4j/DocumentOnTypeFormattingOptions.java
new file mode 100644
index 0000000..3d4fddb
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentOnTypeFormattingOptions.java
@@ -0,0 +1,119 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Format document on type options
+ */
+@SuppressWarnings("all")
+public class DocumentOnTypeFormattingOptions {
+ /**
+ * A character on which formatting should be triggered, like `}`.
+ */
+ @NonNull
+ private String firstTriggerCharacter;
+
+ /**
+ * More trigger characters.
+ */
+ private List<String> moreTriggerCharacter;
+
+ public DocumentOnTypeFormattingOptions() {
+ }
+
+ public DocumentOnTypeFormattingOptions(@NonNull final String firstTriggerCharacter) {
+ this.firstTriggerCharacter = firstTriggerCharacter;
+ }
+
+ public DocumentOnTypeFormattingOptions(@NonNull final String firstTriggerCharacter, final List<String> moreTriggerCharacter) {
+ this.firstTriggerCharacter = Preconditions.<String>checkNotNull(firstTriggerCharacter, "firstTriggerCharacter");
+ this.moreTriggerCharacter = moreTriggerCharacter;
+ }
+
+ /**
+ * A character on which formatting should be triggered, like `}`.
+ */
+ @Pure
+ @NonNull
+ public String getFirstTriggerCharacter() {
+ return this.firstTriggerCharacter;
+ }
+
+ /**
+ * A character on which formatting should be triggered, like `}`.
+ */
+ public void setFirstTriggerCharacter(@NonNull final String firstTriggerCharacter) {
+ this.firstTriggerCharacter = Preconditions.checkNotNull(firstTriggerCharacter, "firstTriggerCharacter");
+ }
+
+ /**
+ * More trigger characters.
+ */
+ @Pure
+ public List<String> getMoreTriggerCharacter() {
+ return this.moreTriggerCharacter;
+ }
+
+ /**
+ * More trigger characters.
+ */
+ public void setMoreTriggerCharacter(final List<String> moreTriggerCharacter) {
+ this.moreTriggerCharacter = moreTriggerCharacter;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("firstTriggerCharacter", this.firstTriggerCharacter);
+ b.add("moreTriggerCharacter", this.moreTriggerCharacter);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DocumentOnTypeFormattingOptions other = (DocumentOnTypeFormattingOptions) obj;
+ if (this.firstTriggerCharacter == null) {
+ if (other.firstTriggerCharacter != null)
+ return false;
+ } else if (!this.firstTriggerCharacter.equals(other.firstTriggerCharacter))
+ return false;
+ if (this.moreTriggerCharacter == null) {
+ if (other.moreTriggerCharacter != null)
+ return false;
+ } else if (!this.moreTriggerCharacter.equals(other.moreTriggerCharacter))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.firstTriggerCharacter== null) ? 0 : this.firstTriggerCharacter.hashCode());
+ return prime * result + ((this.moreTriggerCharacter== null) ? 0 : this.moreTriggerCharacter.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentOnTypeFormattingParams.java b/java/org/eclipse/lsp4j/DocumentOnTypeFormattingParams.java
new file mode 100644
index 0000000..fc6957b
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentOnTypeFormattingParams.java
@@ -0,0 +1,132 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.FormattingOptions;
+import org.eclipse.lsp4j.Position;
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.TextDocumentPositionParams;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The document on type formatting request is sent from the client to the server to format parts of the document during typing.
+ */
+@SuppressWarnings("all")
+public class DocumentOnTypeFormattingParams extends TextDocumentPositionParams {
+ /**
+ * The format options
+ */
+ @NonNull
+ private FormattingOptions options;
+
+ /**
+ * The character that has been typed.
+ */
+ @NonNull
+ private String ch;
+
+ public DocumentOnTypeFormattingParams() {
+ }
+
+ public DocumentOnTypeFormattingParams(@NonNull final TextDocumentIdentifier textDocument, @NonNull final FormattingOptions options, @NonNull final Position position, @NonNull final String ch) {
+ super(textDocument, position);
+ this.options = Preconditions.<FormattingOptions>checkNotNull(options, "options");
+ this.ch = Preconditions.<String>checkNotNull(ch, "ch");
+ }
+
+ @Deprecated
+ public DocumentOnTypeFormattingParams(@NonNull final Position position, @NonNull final String ch) {
+ super.setPosition(position);
+ this.ch = Preconditions.<String>checkNotNull(ch, "ch");
+ }
+
+ /**
+ * The format options
+ */
+ @Pure
+ @NonNull
+ public FormattingOptions getOptions() {
+ return this.options;
+ }
+
+ /**
+ * The format options
+ */
+ public void setOptions(@NonNull final FormattingOptions options) {
+ this.options = Preconditions.checkNotNull(options, "options");
+ }
+
+ /**
+ * The character that has been typed.
+ */
+ @Pure
+ @NonNull
+ public String getCh() {
+ return this.ch;
+ }
+
+ /**
+ * The character that has been typed.
+ */
+ public void setCh(@NonNull final String ch) {
+ this.ch = Preconditions.checkNotNull(ch, "ch");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("options", this.options);
+ b.add("ch", this.ch);
+ b.add("textDocument", getTextDocument());
+ b.add("uri", getUri());
+ b.add("position", getPosition());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DocumentOnTypeFormattingParams other = (DocumentOnTypeFormattingParams) obj;
+ if (this.options == null) {
+ if (other.options != null)
+ return false;
+ } else if (!this.options.equals(other.options))
+ return false;
+ if (this.ch == null) {
+ if (other.ch != null)
+ return false;
+ } else if (!this.ch.equals(other.ch))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((this.options== null) ? 0 : this.options.hashCode());
+ return prime * result + ((this.ch== null) ? 0 : this.ch.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentOnTypeFormattingRegistrationOptions.java b/java/org/eclipse/lsp4j/DocumentOnTypeFormattingRegistrationOptions.java
new file mode 100644
index 0000000..385e9c3
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentOnTypeFormattingRegistrationOptions.java
@@ -0,0 +1,120 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.TextDocumentRegistrationOptions;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class DocumentOnTypeFormattingRegistrationOptions extends TextDocumentRegistrationOptions {
+ /**
+ * A character on which formatting should be triggered, like `}`.
+ */
+ @NonNull
+ private String firstTriggerCharacter;
+
+ /**
+ * More trigger characters.
+ */
+ private List<String> moreTriggerCharacter;
+
+ public DocumentOnTypeFormattingRegistrationOptions() {
+ }
+
+ public DocumentOnTypeFormattingRegistrationOptions(@NonNull final String firstTriggerCharacter) {
+ this.firstTriggerCharacter = Preconditions.<String>checkNotNull(firstTriggerCharacter, "firstTriggerCharacter");
+ }
+
+ public DocumentOnTypeFormattingRegistrationOptions(@NonNull final String firstTriggerCharacter, final List<String> moreTriggerCharacter) {
+ this(firstTriggerCharacter);
+ this.moreTriggerCharacter = moreTriggerCharacter;
+ }
+
+ /**
+ * A character on which formatting should be triggered, like `}`.
+ */
+ @Pure
+ @NonNull
+ public String getFirstTriggerCharacter() {
+ return this.firstTriggerCharacter;
+ }
+
+ /**
+ * A character on which formatting should be triggered, like `}`.
+ */
+ public void setFirstTriggerCharacter(@NonNull final String firstTriggerCharacter) {
+ this.firstTriggerCharacter = Preconditions.checkNotNull(firstTriggerCharacter, "firstTriggerCharacter");
+ }
+
+ /**
+ * More trigger characters.
+ */
+ @Pure
+ public List<String> getMoreTriggerCharacter() {
+ return this.moreTriggerCharacter;
+ }
+
+ /**
+ * More trigger characters.
+ */
+ public void setMoreTriggerCharacter(final List<String> moreTriggerCharacter) {
+ this.moreTriggerCharacter = moreTriggerCharacter;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("firstTriggerCharacter", this.firstTriggerCharacter);
+ b.add("moreTriggerCharacter", this.moreTriggerCharacter);
+ b.add("documentSelector", getDocumentSelector());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DocumentOnTypeFormattingRegistrationOptions other = (DocumentOnTypeFormattingRegistrationOptions) obj;
+ if (this.firstTriggerCharacter == null) {
+ if (other.firstTriggerCharacter != null)
+ return false;
+ } else if (!this.firstTriggerCharacter.equals(other.firstTriggerCharacter))
+ return false;
+ if (this.moreTriggerCharacter == null) {
+ if (other.moreTriggerCharacter != null)
+ return false;
+ } else if (!this.moreTriggerCharacter.equals(other.moreTriggerCharacter))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((this.firstTriggerCharacter== null) ? 0 : this.firstTriggerCharacter.hashCode());
+ return prime * result + ((this.moreTriggerCharacter== null) ? 0 : this.moreTriggerCharacter.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentRangeFormattingOptions.java b/java/org/eclipse/lsp4j/DocumentRangeFormattingOptions.java
new file mode 100644
index 0000000..7a9d270
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentRangeFormattingOptions.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Document range formatting options.
+ */
+@SuppressWarnings("all")
+public class DocumentRangeFormattingOptions extends AbstractWorkDoneProgressOptions {
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentRangeFormattingParams.java b/java/org/eclipse/lsp4j/DocumentRangeFormattingParams.java
new file mode 100644
index 0000000..a43fb75
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentRangeFormattingParams.java
@@ -0,0 +1,200 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.FormattingOptions;
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.WorkDoneProgressParams;
+import org.eclipse.lsp4j.jsonrpc.messages.Either;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The document range formatting request is sent from the client to the server to format a given range in a document.
+ */
+@SuppressWarnings("all")
+public class DocumentRangeFormattingParams implements WorkDoneProgressParams {
+ /**
+ * An optional token that a server can use to report work done progress.
+ */
+ private Either<String, Integer> workDoneToken;
+
+ /**
+ * The document to format.
+ */
+ @NonNull
+ private TextDocumentIdentifier textDocument;
+
+ /**
+ * The format options
+ */
+ @NonNull
+ private FormattingOptions options;
+
+ /**
+ * The range to format
+ */
+ @NonNull
+ private Range range;
+
+ public DocumentRangeFormattingParams() {
+ }
+
+ public DocumentRangeFormattingParams(@NonNull final TextDocumentIdentifier textDocument, @NonNull final FormattingOptions options, @NonNull final Range range) {
+ this.textDocument = Preconditions.<TextDocumentIdentifier>checkNotNull(textDocument, "textDocument");
+ this.options = Preconditions.<FormattingOptions>checkNotNull(options, "options");
+ this.range = Preconditions.<Range>checkNotNull(range, "range");
+ }
+
+ @Deprecated
+ public DocumentRangeFormattingParams(@NonNull final Range range) {
+ this.range = Preconditions.<Range>checkNotNull(range, "range");
+ }
+
+ /**
+ * An optional token that a server can use to report work done progress.
+ */
+ @Pure
+ @Override
+ public Either<String, Integer> getWorkDoneToken() {
+ return this.workDoneToken;
+ }
+
+ /**
+ * An optional token that a server can use to report work done progress.
+ */
+ public void setWorkDoneToken(final Either<String, Integer> workDoneToken) {
+ this.workDoneToken = workDoneToken;
+ }
+
+ public void setWorkDoneToken(final String workDoneToken) {
+ if (workDoneToken == null) {
+ this.workDoneToken = null;
+ return;
+ }
+ this.workDoneToken = Either.forLeft(workDoneToken);
+ }
+
+ public void setWorkDoneToken(final Integer workDoneToken) {
+ if (workDoneToken == null) {
+ this.workDoneToken = null;
+ return;
+ }
+ this.workDoneToken = Either.forRight(workDoneToken);
+ }
+
+ /**
+ * The document to format.
+ */
+ @Pure
+ @NonNull
+ public TextDocumentIdentifier getTextDocument() {
+ return this.textDocument;
+ }
+
+ /**
+ * The document to format.
+ */
+ public void setTextDocument(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.checkNotNull(textDocument, "textDocument");
+ }
+
+ /**
+ * The format options
+ */
+ @Pure
+ @NonNull
+ public FormattingOptions getOptions() {
+ return this.options;
+ }
+
+ /**
+ * The format options
+ */
+ public void setOptions(@NonNull final FormattingOptions options) {
+ this.options = Preconditions.checkNotNull(options, "options");
+ }
+
+ /**
+ * The range to format
+ */
+ @Pure
+ @NonNull
+ public Range getRange() {
+ return this.range;
+ }
+
+ /**
+ * The range to format
+ */
+ public void setRange(@NonNull final Range range) {
+ this.range = Preconditions.checkNotNull(range, "range");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneToken", this.workDoneToken);
+ b.add("textDocument", this.textDocument);
+ b.add("options", this.options);
+ b.add("range", this.range);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DocumentRangeFormattingParams other = (DocumentRangeFormattingParams) obj;
+ if (this.workDoneToken == null) {
+ if (other.workDoneToken != null)
+ return false;
+ } else if (!this.workDoneToken.equals(other.workDoneToken))
+ return false;
+ if (this.textDocument == null) {
+ if (other.textDocument != null)
+ return false;
+ } else if (!this.textDocument.equals(other.textDocument))
+ return false;
+ if (this.options == null) {
+ if (other.options != null)
+ return false;
+ } else if (!this.options.equals(other.options))
+ return false;
+ if (this.range == null) {
+ if (other.range != null)
+ return false;
+ } else if (!this.range.equals(other.range))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.workDoneToken== null) ? 0 : this.workDoneToken.hashCode());
+ result = prime * result + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());
+ result = prime * result + ((this.options== null) ? 0 : this.options.hashCode());
+ return prime * result + ((this.range== null) ? 0 : this.range.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentRangeFormattingRegistrationOptions.java b/java/org/eclipse/lsp4j/DocumentRangeFormattingRegistrationOptions.java
new file mode 100644
index 0000000..a482db6
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentRangeFormattingRegistrationOptions.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractTextDocumentRegistrationAndWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Document range formatting registration options.
+ */
+@SuppressWarnings("all")
+public class DocumentRangeFormattingRegistrationOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions {
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ b.add("documentSelector", getDocumentSelector());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentSymbol.java b/java/org/eclipse/lsp4j/DocumentSymbol.java
new file mode 100644
index 0000000..b7b34ea
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentSymbol.java
@@ -0,0 +1,328 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.Range;
+import org.eclipse.lsp4j.SymbolKind;
+import org.eclipse.lsp4j.SymbolTag;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Represents programming constructs like variables, classes, interfaces etc. that appear in a document. Document symbols can be
+ * hierarchical and they have two ranges: one that encloses its definition and one that points to its most interesting range,
+ * e.g. the range of an identifier.
+ */
+@SuppressWarnings("all")
+public class DocumentSymbol {
+ /**
+ * The name of this symbol.
+ */
+ @NonNull
+ private String name;
+
+ /**
+ * The kind of this symbol.
+ */
+ @NonNull
+ private SymbolKind kind;
+
+ /**
+ * The range enclosing this symbol not including leading/trailing whitespace but everything else
+ * like comments. This information is typically used to determine if the clients cursor is
+ * inside the symbol to reveal in the symbol in the UI.
+ */
+ @NonNull
+ private Range range;
+
+ /**
+ * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
+ * Must be contained by the {@link #range}.
+ */
+ @NonNull
+ private Range selectionRange;
+
+ /**
+ * More detail for this symbol, e.g the signature of a function. If not provided the
+ * name is used.
+ */
+ private String detail;
+
+ /**
+ * Tags for this document symbol.
+ * <p>
+ * Since 3.16.0
+ */
+ private List<SymbolTag> tags;
+
+ /**
+ * Indicates if this symbol is deprecated.
+ *
+ * @deprecated Use {@link #tags} instead if supported.
+ */
+ @Deprecated
+ private Boolean deprecated;
+
+ /**
+ * Children of this symbol, e.g. properties of a class.
+ */
+ private List<DocumentSymbol> children;
+
+ public DocumentSymbol() {
+ }
+
+ public DocumentSymbol(@NonNull final String name, @NonNull final SymbolKind kind, @NonNull final Range range, @NonNull final Range selectionRange) {
+ this.name = Preconditions.<String>checkNotNull(name, "name");
+ this.kind = Preconditions.<SymbolKind>checkNotNull(kind, "kind");
+ this.range = Preconditions.<Range>checkNotNull(range, "range");
+ this.selectionRange = Preconditions.<Range>checkNotNull(selectionRange, "selectionRange");
+ }
+
+ public DocumentSymbol(@NonNull final String name, @NonNull final SymbolKind kind, @NonNull final Range range, @NonNull final Range selectionRange, final String detail) {
+ this(name, kind, range, selectionRange);
+ this.detail = detail;
+ }
+
+ public DocumentSymbol(@NonNull final String name, @NonNull final SymbolKind kind, @NonNull final Range range, @NonNull final Range selectionRange, final String detail, final List<DocumentSymbol> children) {
+ this(name, kind, range, selectionRange);
+ this.detail = detail;
+ this.children = children;
+ }
+
+ /**
+ * The name of this symbol.
+ */
+ @Pure
+ @NonNull
+ public String getName() {
+ return this.name;
+ }
+
+ /**
+ * The name of this symbol.
+ */
+ public void setName(@NonNull final String name) {
+ this.name = Preconditions.checkNotNull(name, "name");
+ }
+
+ /**
+ * The kind of this symbol.
+ */
+ @Pure
+ @NonNull
+ public SymbolKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * The kind of this symbol.
+ */
+ public void setKind(@NonNull final SymbolKind kind) {
+ this.kind = Preconditions.checkNotNull(kind, "kind");
+ }
+
+ /**
+ * The range enclosing this symbol not including leading/trailing whitespace but everything else
+ * like comments. This information is typically used to determine if the clients cursor is
+ * inside the symbol to reveal in the symbol in the UI.
+ */
+ @Pure
+ @NonNull
+ public Range getRange() {
+ return this.range;
+ }
+
+ /**
+ * The range enclosing this symbol not including leading/trailing whitespace but everything else
+ * like comments. This information is typically used to determine if the clients cursor is
+ * inside the symbol to reveal in the symbol in the UI.
+ */
+ public void setRange(@NonNull final Range range) {
+ this.range = Preconditions.checkNotNull(range, "range");
+ }
+
+ /**
+ * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
+ * Must be contained by the {@link #range}.
+ */
+ @Pure
+ @NonNull
+ public Range getSelectionRange() {
+ return this.selectionRange;
+ }
+
+ /**
+ * The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
+ * Must be contained by the {@link #range}.
+ */
+ public void setSelectionRange(@NonNull final Range selectionRange) {
+ this.selectionRange = Preconditions.checkNotNull(selectionRange, "selectionRange");
+ }
+
+ /**
+ * More detail for this symbol, e.g the signature of a function. If not provided the
+ * name is used.
+ */
+ @Pure
+ public String getDetail() {
+ return this.detail;
+ }
+
+ /**
+ * More detail for this symbol, e.g the signature of a function. If not provided the
+ * name is used.
+ */
+ public void setDetail(final String detail) {
+ this.detail = detail;
+ }
+
+ /**
+ * Tags for this document symbol.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public List<SymbolTag> getTags() {
+ return this.tags;
+ }
+
+ /**
+ * Tags for this document symbol.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setTags(final List<SymbolTag> tags) {
+ this.tags = tags;
+ }
+
+ /**
+ * Indicates if this symbol is deprecated.
+ *
+ * @deprecated Use {@link #tags} instead if supported.
+ */
+ @Pure
+ @Deprecated
+ public Boolean getDeprecated() {
+ return this.deprecated;
+ }
+
+ /**
+ * Indicates if this symbol is deprecated.
+ *
+ * @deprecated Use {@link #tags} instead if supported.
+ */
+ @Deprecated
+ public void setDeprecated(final Boolean deprecated) {
+ this.deprecated = deprecated;
+ }
+
+ /**
+ * Children of this symbol, e.g. properties of a class.
+ */
+ @Pure
+ public List<DocumentSymbol> getChildren() {
+ return this.children;
+ }
+
+ /**
+ * Children of this symbol, e.g. properties of a class.
+ */
+ public void setChildren(final List<DocumentSymbol> children) {
+ this.children = children;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("name", this.name);
+ b.add("kind", this.kind);
+ b.add("range", this.range);
+ b.add("selectionRange", this.selectionRange);
+ b.add("detail", this.detail);
+ b.add("tags", this.tags);
+ b.add("deprecated", this.deprecated);
+ b.add("children", this.children);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DocumentSymbol other = (DocumentSymbol) obj;
+ if (this.name == null) {
+ if (other.name != null)
+ return false;
+ } else if (!this.name.equals(other.name))
+ return false;
+ if (this.kind == null) {
+ if (other.kind != null)
+ return false;
+ } else if (!this.kind.equals(other.kind))
+ return false;
+ if (this.range == null) {
+ if (other.range != null)
+ return false;
+ } else if (!this.range.equals(other.range))
+ return false;
+ if (this.selectionRange == null) {
+ if (other.selectionRange != null)
+ return false;
+ } else if (!this.selectionRange.equals(other.selectionRange))
+ return false;
+ if (this.detail == null) {
+ if (other.detail != null)
+ return false;
+ } else if (!this.detail.equals(other.detail))
+ return false;
+ if (this.tags == null) {
+ if (other.tags != null)
+ return false;
+ } else if (!this.tags.equals(other.tags))
+ return false;
+ if (this.deprecated == null) {
+ if (other.deprecated != null)
+ return false;
+ } else if (!this.deprecated.equals(other.deprecated))
+ return false;
+ if (this.children == null) {
+ if (other.children != null)
+ return false;
+ } else if (!this.children.equals(other.children))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.name== null) ? 0 : this.name.hashCode());
+ result = prime * result + ((this.kind== null) ? 0 : this.kind.hashCode());
+ result = prime * result + ((this.range== null) ? 0 : this.range.hashCode());
+ result = prime * result + ((this.selectionRange== null) ? 0 : this.selectionRange.hashCode());
+ result = prime * result + ((this.detail== null) ? 0 : this.detail.hashCode());
+ result = prime * result + ((this.tags== null) ? 0 : this.tags.hashCode());
+ result = prime * result + ((this.deprecated== null) ? 0 : this.deprecated.hashCode());
+ return prime * result + ((this.children== null) ? 0 : this.children.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentSymbolCapabilities.java b/java/org/eclipse/lsp4j/DocumentSymbolCapabilities.java
new file mode 100644
index 0000000..b31f3e5
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentSymbolCapabilities.java
@@ -0,0 +1,205 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
+import org.eclipse.lsp4j.SymbolKindCapabilities;
+import org.eclipse.lsp4j.SymbolTagSupportCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Capabilities specific to the `textDocument/documentSymbol`
+ */
+@SuppressWarnings("all")
+public class DocumentSymbolCapabilities extends DynamicRegistrationCapabilities {
+ /**
+ * Specific capabilities for the {@link SymbolKind}.
+ */
+ private SymbolKindCapabilities symbolKind;
+
+ /**
+ * The client support hierarchical document symbols.
+ */
+ private Boolean hierarchicalDocumentSymbolSupport;
+
+ /**
+ * The client supports tags on {@link SymbolInformation}. Tags are supported on
+ * {@link DocumentSymbol} if {@link #hierarchicalDocumentSymbolSupport} is set to true.
+ * Clients supporting tags have to handle unknown tags gracefully.
+ * <p>
+ * Since 3.16.0
+ */
+ private SymbolTagSupportCapabilities tagSupport;
+
+ /**
+ * The client supports an additional label presented in the UI when
+ * registering a document symbol provider.
+ * <p>
+ * Since 3.16.0
+ */
+ private Boolean labelSupport;
+
+ public DocumentSymbolCapabilities() {
+ }
+
+ public DocumentSymbolCapabilities(final Boolean dynamicRegistration) {
+ super(dynamicRegistration);
+ }
+
+ public DocumentSymbolCapabilities(final SymbolKindCapabilities symbolKind) {
+ this.symbolKind = symbolKind;
+ }
+
+ public DocumentSymbolCapabilities(final SymbolKindCapabilities symbolKind, final Boolean dynamicRegistration) {
+ super(dynamicRegistration);
+ this.symbolKind = symbolKind;
+ }
+
+ public DocumentSymbolCapabilities(final SymbolKindCapabilities symbolKind, final Boolean dynamicRegistration, final Boolean hierarchicalDocumentSymbolSupport) {
+ super(dynamicRegistration);
+ this.symbolKind = symbolKind;
+ this.hierarchicalDocumentSymbolSupport = hierarchicalDocumentSymbolSupport;
+ }
+
+ /**
+ * Specific capabilities for the {@link SymbolKind}.
+ */
+ @Pure
+ public SymbolKindCapabilities getSymbolKind() {
+ return this.symbolKind;
+ }
+
+ /**
+ * Specific capabilities for the {@link SymbolKind}.
+ */
+ public void setSymbolKind(final SymbolKindCapabilities symbolKind) {
+ this.symbolKind = symbolKind;
+ }
+
+ /**
+ * The client support hierarchical document symbols.
+ */
+ @Pure
+ public Boolean getHierarchicalDocumentSymbolSupport() {
+ return this.hierarchicalDocumentSymbolSupport;
+ }
+
+ /**
+ * The client support hierarchical document symbols.
+ */
+ public void setHierarchicalDocumentSymbolSupport(final Boolean hierarchicalDocumentSymbolSupport) {
+ this.hierarchicalDocumentSymbolSupport = hierarchicalDocumentSymbolSupport;
+ }
+
+ /**
+ * The client supports tags on {@link SymbolInformation}. Tags are supported on
+ * {@link DocumentSymbol} if {@link #hierarchicalDocumentSymbolSupport} is set to true.
+ * Clients supporting tags have to handle unknown tags gracefully.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public SymbolTagSupportCapabilities getTagSupport() {
+ return this.tagSupport;
+ }
+
+ /**
+ * The client supports tags on {@link SymbolInformation}. Tags are supported on
+ * {@link DocumentSymbol} if {@link #hierarchicalDocumentSymbolSupport} is set to true.
+ * Clients supporting tags have to handle unknown tags gracefully.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setTagSupport(final SymbolTagSupportCapabilities tagSupport) {
+ this.tagSupport = tagSupport;
+ }
+
+ /**
+ * The client supports an additional label presented in the UI when
+ * registering a document symbol provider.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public Boolean getLabelSupport() {
+ return this.labelSupport;
+ }
+
+ /**
+ * The client supports an additional label presented in the UI when
+ * registering a document symbol provider.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setLabelSupport(final Boolean labelSupport) {
+ this.labelSupport = labelSupport;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("symbolKind", this.symbolKind);
+ b.add("hierarchicalDocumentSymbolSupport", this.hierarchicalDocumentSymbolSupport);
+ b.add("tagSupport", this.tagSupport);
+ b.add("labelSupport", this.labelSupport);
+ b.add("dynamicRegistration", getDynamicRegistration());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DocumentSymbolCapabilities other = (DocumentSymbolCapabilities) obj;
+ if (this.symbolKind == null) {
+ if (other.symbolKind != null)
+ return false;
+ } else if (!this.symbolKind.equals(other.symbolKind))
+ return false;
+ if (this.hierarchicalDocumentSymbolSupport == null) {
+ if (other.hierarchicalDocumentSymbolSupport != null)
+ return false;
+ } else if (!this.hierarchicalDocumentSymbolSupport.equals(other.hierarchicalDocumentSymbolSupport))
+ return false;
+ if (this.tagSupport == null) {
+ if (other.tagSupport != null)
+ return false;
+ } else if (!this.tagSupport.equals(other.tagSupport))
+ return false;
+ if (this.labelSupport == null) {
+ if (other.labelSupport != null)
+ return false;
+ } else if (!this.labelSupport.equals(other.labelSupport))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((this.symbolKind== null) ? 0 : this.symbolKind.hashCode());
+ result = prime * result + ((this.hierarchicalDocumentSymbolSupport== null) ? 0 : this.hierarchicalDocumentSymbolSupport.hashCode());
+ result = prime * result + ((this.tagSupport== null) ? 0 : this.tagSupport.hashCode());
+ return prime * result + ((this.labelSupport== null) ? 0 : this.labelSupport.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentSymbolOptions.java b/java/org/eclipse/lsp4j/DocumentSymbolOptions.java
new file mode 100644
index 0000000..cff82fd
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentSymbolOptions.java
@@ -0,0 +1,90 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class DocumentSymbolOptions extends AbstractWorkDoneProgressOptions {
+ /**
+ * A human-readable string that is shown when multiple outlines trees
+ * are shown for the same document.
+ * <p>
+ * Since 3.16.0
+ */
+ private String label;
+
+ public DocumentSymbolOptions() {
+ }
+
+ public DocumentSymbolOptions(final String label) {
+ this.label = label;
+ }
+
+ /**
+ * A human-readable string that is shown when multiple outlines trees
+ * are shown for the same document.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public String getLabel() {
+ return this.label;
+ }
+
+ /**
+ * A human-readable string that is shown when multiple outlines trees
+ * are shown for the same document.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setLabel(final String label) {
+ this.label = label;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("label", this.label);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DocumentSymbolOptions other = (DocumentSymbolOptions) obj;
+ if (this.label == null) {
+ if (other.label != null)
+ return false;
+ } else if (!this.label.equals(other.label))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.label== null) ? 0 : this.label.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentSymbolParams.java b/java/org/eclipse/lsp4j/DocumentSymbolParams.java
new file mode 100644
index 0000000..62b5428
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentSymbolParams.java
@@ -0,0 +1,90 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.TextDocumentIdentifier;
+import org.eclipse.lsp4j.WorkDoneProgressAndPartialResultParams;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The document symbol request is sent from the client to the server to list all symbols found in a given text document.
+ */
+@SuppressWarnings("all")
+public class DocumentSymbolParams extends WorkDoneProgressAndPartialResultParams {
+ /**
+ * The text document.
+ */
+ @NonNull
+ private TextDocumentIdentifier textDocument;
+
+ public DocumentSymbolParams() {
+ }
+
+ public DocumentSymbolParams(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.<TextDocumentIdentifier>checkNotNull(textDocument, "textDocument");
+ }
+
+ /**
+ * The text document.
+ */
+ @Pure
+ @NonNull
+ public TextDocumentIdentifier getTextDocument() {
+ return this.textDocument;
+ }
+
+ /**
+ * The text document.
+ */
+ public void setTextDocument(@NonNull final TextDocumentIdentifier textDocument) {
+ this.textDocument = Preconditions.checkNotNull(textDocument, "textDocument");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("textDocument", this.textDocument);
+ b.add("workDoneToken", getWorkDoneToken());
+ b.add("partialResultToken", getPartialResultToken());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DocumentSymbolParams other = (DocumentSymbolParams) obj;
+ if (this.textDocument == null) {
+ if (other.textDocument != null)
+ return false;
+ } else if (!this.textDocument.equals(other.textDocument))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.textDocument== null) ? 0 : this.textDocument.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DocumentSymbolRegistrationOptions.java b/java/org/eclipse/lsp4j/DocumentSymbolRegistrationOptions.java
new file mode 100644
index 0000000..e7598b0
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DocumentSymbolRegistrationOptions.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.AbstractTextDocumentRegistrationAndWorkDoneProgressOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class DocumentSymbolRegistrationOptions extends AbstractTextDocumentRegistrationAndWorkDoneProgressOptions {
+ /**
+ * A human-readable string that is shown when multiple outlines trees
+ * are shown for the same document.
+ * <p>
+ * Since 3.16.0
+ */
+ private String label;
+
+ public DocumentSymbolRegistrationOptions() {
+ }
+
+ public DocumentSymbolRegistrationOptions(final String label) {
+ this.label = label;
+ }
+
+ /**
+ * A human-readable string that is shown when multiple outlines trees
+ * are shown for the same document.
+ * <p>
+ * Since 3.16.0
+ */
+ @Pure
+ public String getLabel() {
+ return this.label;
+ }
+
+ /**
+ * A human-readable string that is shown when multiple outlines trees
+ * are shown for the same document.
+ * <p>
+ * Since 3.16.0
+ */
+ public void setLabel(final String label) {
+ this.label = label;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("label", this.label);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ b.add("documentSelector", getDocumentSelector());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ DocumentSymbolRegistrationOptions other = (DocumentSymbolRegistrationOptions) obj;
+ if (this.label == null) {
+ if (other.label != null)
+ return false;
+ } else if (!this.label.equals(other.label))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.label== null) ? 0 : this.label.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/DynamicRegistrationCapabilities.java b/java/org/eclipse/lsp4j/DynamicRegistrationCapabilities.java
new file mode 100644
index 0000000..7991906
--- /dev/null
+++ b/java/org/eclipse/lsp4j/DynamicRegistrationCapabilities.java
@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public class DynamicRegistrationCapabilities {
+ /**
+ * Supports dynamic registration.
+ */
+ private Boolean dynamicRegistration;
+
+ public DynamicRegistrationCapabilities() {
+ }
+
+ public DynamicRegistrationCapabilities(final Boolean dynamicRegistration) {
+ this.dynamicRegistration = dynamicRegistration;
+ }
+
+ /**
+ * Supports dynamic registration.
+ */
+ @Pure
+ public Boolean getDynamicRegistration() {
+ return this.dynamicRegistration;
+ }
+
+ /**
+ * Supports dynamic registration.
+ */
+ public void setDynamicRegistration(final Boolean dynamicRegistration) {
+ this.dynamicRegistration = dynamicRegistration;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("dynamicRegistration", this.dynamicRegistration);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ DynamicRegistrationCapabilities other = (DynamicRegistrationCapabilities) obj;
+ if (this.dynamicRegistration == null) {
+ if (other.dynamicRegistration != null)
+ return false;
+ } else if (!this.dynamicRegistration.equals(other.dynamicRegistration))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.dynamicRegistration== null) ? 0 : this.dynamicRegistration.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ExecuteCommandCapabilities.java b/java/org/eclipse/lsp4j/ExecuteCommandCapabilities.java
new file mode 100644
index 0000000..7782024
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ExecuteCommandCapabilities.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Capabilities specific to the `workspace/executeCommand` request.
+ */
+@SuppressWarnings("all")
+public class ExecuteCommandCapabilities extends DynamicRegistrationCapabilities {
+ public ExecuteCommandCapabilities() {
+ }
+
+ public ExecuteCommandCapabilities(final Boolean dynamicRegistration) {
+ super(dynamicRegistration);
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("dynamicRegistration", getDynamicRegistration());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ExecuteCommandOptions.java b/java/org/eclipse/lsp4j/ExecuteCommandOptions.java
new file mode 100644
index 0000000..a1f7527
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ExecuteCommandOptions.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.lsp4j.AbstractWorkDoneProgressOptions;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Execute command options.
+ */
+@SuppressWarnings("all")
+public class ExecuteCommandOptions extends AbstractWorkDoneProgressOptions {
+ /**
+ * The commands to be executed on the server
+ */
+ @NonNull
+ private List<String> commands;
+
+ public ExecuteCommandOptions() {
+ this(new ArrayList<String>());
+ }
+
+ public ExecuteCommandOptions(@NonNull final List<String> commands) {
+ this.commands = Preconditions.<List<String>>checkNotNull(commands, "commands");
+ }
+
+ /**
+ * The commands to be executed on the server
+ */
+ @Pure
+ @NonNull
+ public List<String> getCommands() {
+ return this.commands;
+ }
+
+ /**
+ * The commands to be executed on the server
+ */
+ public void setCommands(@NonNull final List<String> commands) {
+ this.commands = Preconditions.checkNotNull(commands, "commands");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("commands", this.commands);
+ b.add("workDoneProgress", getWorkDoneProgress());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ ExecuteCommandOptions other = (ExecuteCommandOptions) obj;
+ if (this.commands == null) {
+ if (other.commands != null)
+ return false;
+ } else if (!this.commands.equals(other.commands))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * super.hashCode() + ((this.commands== null) ? 0 : this.commands.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ExecuteCommandParams.java b/java/org/eclipse/lsp4j/ExecuteCommandParams.java
new file mode 100644
index 0000000..70cbb96
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ExecuteCommandParams.java
@@ -0,0 +1,175 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.List;
+import org.eclipse.lsp4j.WorkDoneProgressParams;
+import org.eclipse.lsp4j.jsonrpc.messages.Either;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The workspace/executeCommand request is sent from the client to the server to trigger command
+ * execution on the server. In most cases the server creates a WorkspaceEdit structure and applies
+ * the changes to the workspace using the request workspace/applyEdit which is sent from the server
+ * to the client.
+ */
+@SuppressWarnings("all")
+public class ExecuteCommandParams implements WorkDoneProgressParams {
+ /**
+ * An optional token that a server can use to report work done progress.
+ */
+ private Either<String, Integer> workDoneToken;
+
+ /**
+ * The identifier of the actual command handler.
+ */
+ @NonNull
+ private String command;
+
+ /**
+ * Arguments that the command should be invoked with.
+ * The arguments are typically specified when a command is returned from the server to the client.
+ * Example requests that return a command are textDocument/codeAction or textDocument/codeLens.
+ */
+ private List<Object> arguments;
+
+ public ExecuteCommandParams() {
+ }
+
+ public ExecuteCommandParams(@NonNull final String command, final List<Object> arguments) {
+ this.command = Preconditions.<String>checkNotNull(command, "command");
+ this.arguments = arguments;
+ }
+
+ public ExecuteCommandParams(@NonNull final String command, final List<Object> arguments, final Either<String, Integer> workDoneToken) {
+ this(command, arguments);
+ this.workDoneToken = workDoneToken;
+ }
+
+ /**
+ * An optional token that a server can use to report work done progress.
+ */
+ @Pure
+ @Override
+ public Either<String, Integer> getWorkDoneToken() {
+ return this.workDoneToken;
+ }
+
+ /**
+ * An optional token that a server can use to report work done progress.
+ */
+ public void setWorkDoneToken(final Either<String, Integer> workDoneToken) {
+ this.workDoneToken = workDoneToken;
+ }
+
+ public void setWorkDoneToken(final String workDoneToken) {
+ if (workDoneToken == null) {
+ this.workDoneToken = null;
+ return;
+ }
+ this.workDoneToken = Either.forLeft(workDoneToken);
+ }
+
+ public void setWorkDoneToken(final Integer workDoneToken) {
+ if (workDoneToken == null) {
+ this.workDoneToken = null;
+ return;
+ }
+ this.workDoneToken = Either.forRight(workDoneToken);
+ }
+
+ /**
+ * The identifier of the actual command handler.
+ */
+ @Pure
+ @NonNull
+ public String getCommand() {
+ return this.command;
+ }
+
+ /**
+ * The identifier of the actual command handler.
+ */
+ public void setCommand(@NonNull final String command) {
+ this.command = Preconditions.checkNotNull(command, "command");
+ }
+
+ /**
+ * Arguments that the command should be invoked with.
+ * The arguments are typically specified when a command is returned from the server to the client.
+ * Example requests that return a command are textDocument/codeAction or textDocument/codeLens.
+ */
+ @Pure
+ public List<Object> getArguments() {
+ return this.arguments;
+ }
+
+ /**
+ * Arguments that the command should be invoked with.
+ * The arguments are typically specified when a command is returned from the server to the client.
+ * Example requests that return a command are textDocument/codeAction or textDocument/codeLens.
+ */
+ public void setArguments(final List<Object> arguments) {
+ this.arguments = arguments;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("workDoneToken", this.workDoneToken);
+ b.add("command", this.command);
+ b.add("arguments", this.arguments);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ExecuteCommandParams other = (ExecuteCommandParams) obj;
+ if (this.workDoneToken == null) {
+ if (other.workDoneToken != null)
+ return false;
+ } else if (!this.workDoneToken.equals(other.workDoneToken))
+ return false;
+ if (this.command == null) {
+ if (other.command != null)
+ return false;
+ } else if (!this.command.equals(other.command))
+ return false;
+ if (this.arguments == null) {
+ if (other.arguments != null)
+ return false;
+ } else if (!this.arguments.equals(other.arguments))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.workDoneToken== null) ? 0 : this.workDoneToken.hashCode());
+ result = prime * result + ((this.command== null) ? 0 : this.command.hashCode());
+ return prime * result + ((this.arguments== null) ? 0 : this.arguments.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/ExecuteCommandRegistrationOptions.java b/java/org/eclipse/lsp4j/ExecuteCommandRegistrationOptions.java
new file mode 100644
index 0000000..d2f2cca
--- /dev/null
+++ b/java/org/eclipse/lsp4j/ExecuteCommandRegistrationOptions.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.ExecuteCommandOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Execute command registration options.
+ */
+@SuppressWarnings("all")
+public class ExecuteCommandRegistrationOptions extends ExecuteCommandOptions {
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("commands", getCommands());
+ b.add("workDoneProgress", getWorkDoneProgress());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/java/org/eclipse/lsp4j/FailureHandlingKind.java b/java/org/eclipse/lsp4j/FailureHandlingKind.java
new file mode 100644
index 0000000..7b0c832
--- /dev/null
+++ b/java/org/eclipse/lsp4j/FailureHandlingKind.java
@@ -0,0 +1,48 @@
+/******************************************************************************
+ * Copyright (c) 2018 Microsoft Corporation and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ ******************************************************************************/
+
+package org.eclipse.lsp4j;
+
+/**
+ * The kind of failure handling supported by the client.
+ */
+public final class FailureHandlingKind {
+
+ private FailureHandlingKind() {
+ }
+
+ /**
+ * Applying the workspace change is simply aborted if one of the changes
+ * provided fails. All operations executed before the failing operation stay
+ * executed.
+ */
+ public static final String Abort = "abort";
+
+ /**
+ * All operations are executed transactional. That means they either all succeed
+ * or no changes at all are applied to the workspace.
+ */
+ public static final String Transactional = "transactional";
+
+ /**
+ * If the workspace edit contains only textual file changes they are executed
+ * transactional. If resource changes (create, rename or delete file) are part
+ * of the change the failure handling strategy is abort.
+ */
+ public static final String TextOnlyTransactional = "textOnlyTransactional";
+
+ /**
+ * The client tries to undo the operations already executed. But there is no
+ * guaruntee that this is succeeding.
+ */
+ public static final String Undo = "undo";
+}
diff --git a/java/org/eclipse/lsp4j/FileChangeType.java b/java/org/eclipse/lsp4j/FileChangeType.java
new file mode 100644
index 0000000..cb242d8
--- /dev/null
+++ b/java/org/eclipse/lsp4j/FileChangeType.java
@@ -0,0 +1,51 @@
+/******************************************************************************
+ * Copyright (c) 2016 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ ******************************************************************************/
+package org.eclipse.lsp4j;
+
+/**
+ * The file event type.
+ */
+public enum FileChangeType {
+
+ /**
+ * The file got created.
+ */
+ Created(1),
+
+ /**
+ * The file got changed.
+ */
+ Changed(2),
+
+ /**
+ * The file got deleted.
+ */
+ Deleted(3);
+
+ private final int value;
+
+ FileChangeType(int value) {
+ this.value = value;
+ }
+
+ public int getValue() {
+ return value;
+ }
+
+ public static FileChangeType forValue(int value) {
+ FileChangeType[] allValues = FileChangeType.values();
+ if (value < 1 || value > allValues.length)
+ throw new IllegalArgumentException("Illegal enum value: " + value);
+ return allValues[value - 1];
+ }
+
+}
diff --git a/java/org/eclipse/lsp4j/FileCreate.java b/java/org/eclipse/lsp4j/FileCreate.java
new file mode 100644
index 0000000..bbac713
--- /dev/null
+++ b/java/org/eclipse/lsp4j/FileCreate.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Represents information on a file/folder create.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class FileCreate {
+ /**
+ * A file:// URI for the location of the file/folder being created.
+ */
+ @NonNull
+ private String uri;
+
+ public FileCreate() {
+ }
+
+ public FileCreate(@NonNull final String uri) {
+ this.uri = Preconditions.<String>checkNotNull(uri, "uri");
+ }
+
+ /**
+ * A file:// URI for the location of the file/folder being created.
+ */
+ @Pure
+ @NonNull
+ public String getUri() {
+ return this.uri;
+ }
+
+ /**
+ * A file:// URI for the location of the file/folder being created.
+ */
+ public void setUri(@NonNull final String uri) {
+ this.uri = Preconditions.checkNotNull(uri, "uri");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("uri", this.uri);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ FileCreate other = (FileCreate) obj;
+ if (this.uri == null) {
+ if (other.uri != null)
+ return false;
+ } else if (!this.uri.equals(other.uri))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.uri== null) ? 0 : this.uri.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/FileDelete.java b/java/org/eclipse/lsp4j/FileDelete.java
new file mode 100644
index 0000000..dc1762b
--- /dev/null
+++ b/java/org/eclipse/lsp4j/FileDelete.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Represents information on a file/folder delete.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class FileDelete {
+ /**
+ * A file:// URI for the location of the file/folder being deleted.
+ */
+ @NonNull
+ private String uri;
+
+ public FileDelete() {
+ }
+
+ public FileDelete(@NonNull final String uri) {
+ this.uri = Preconditions.<String>checkNotNull(uri, "uri");
+ }
+
+ /**
+ * A file:// URI for the location of the file/folder being deleted.
+ */
+ @Pure
+ @NonNull
+ public String getUri() {
+ return this.uri;
+ }
+
+ /**
+ * A file:// URI for the location of the file/folder being deleted.
+ */
+ public void setUri(@NonNull final String uri) {
+ this.uri = Preconditions.checkNotNull(uri, "uri");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("uri", this.uri);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ FileDelete other = (FileDelete) obj;
+ if (this.uri == null) {
+ if (other.uri != null)
+ return false;
+ } else if (!this.uri.equals(other.uri))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.uri== null) ? 0 : this.uri.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/FileEvent.java b/java/org/eclipse/lsp4j/FileEvent.java
new file mode 100644
index 0000000..218d85f
--- /dev/null
+++ b/java/org/eclipse/lsp4j/FileEvent.java
@@ -0,0 +1,117 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.FileChangeType;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * An event describing a file change.
+ */
+@SuppressWarnings("all")
+public class FileEvent {
+ /**
+ * The file's uri.
+ */
+ @NonNull
+ private String uri;
+
+ /**
+ * The change type.
+ */
+ @NonNull
+ private FileChangeType type;
+
+ public FileEvent() {
+ }
+
+ public FileEvent(@NonNull final String uri, @NonNull final FileChangeType type) {
+ this.uri = Preconditions.<String>checkNotNull(uri, "uri");
+ this.type = Preconditions.<FileChangeType>checkNotNull(type, "type");
+ }
+
+ /**
+ * The file's uri.
+ */
+ @Pure
+ @NonNull
+ public String getUri() {
+ return this.uri;
+ }
+
+ /**
+ * The file's uri.
+ */
+ public void setUri(@NonNull final String uri) {
+ this.uri = Preconditions.checkNotNull(uri, "uri");
+ }
+
+ /**
+ * The change type.
+ */
+ @Pure
+ @NonNull
+ public FileChangeType getType() {
+ return this.type;
+ }
+
+ /**
+ * The change type.
+ */
+ public void setType(@NonNull final FileChangeType type) {
+ this.type = Preconditions.checkNotNull(type, "type");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("uri", this.uri);
+ b.add("type", this.type);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ FileEvent other = (FileEvent) obj;
+ if (this.uri == null) {
+ if (other.uri != null)
+ return false;
+ } else if (!this.uri.equals(other.uri))
+ return false;
+ if (this.type == null) {
+ if (other.type != null)
+ return false;
+ } else if (!this.type.equals(other.type))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.uri== null) ? 0 : this.uri.hashCode());
+ return prime * result + ((this.type== null) ? 0 : this.type.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/FileOperationFilter.java b/java/org/eclipse/lsp4j/FileOperationFilter.java
new file mode 100644
index 0000000..7499af2
--- /dev/null
+++ b/java/org/eclipse/lsp4j/FileOperationFilter.java
@@ -0,0 +1,122 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.FileOperationPattern;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * A filter to describe in which file operation requests or notifications
+ * the server is interested in.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class FileOperationFilter {
+ /**
+ * The actual file operation pattern.
+ */
+ @NonNull
+ private FileOperationPattern pattern;
+
+ /**
+ * A Uri like {@code file} or {@code untitled}.
+ */
+ private String scheme;
+
+ public FileOperationFilter() {
+ }
+
+ public FileOperationFilter(@NonNull final FileOperationPattern pattern) {
+ this.pattern = Preconditions.<FileOperationPattern>checkNotNull(pattern, "pattern");
+ }
+
+ public FileOperationFilter(@NonNull final FileOperationPattern pattern, final String scheme) {
+ this(pattern);
+ this.scheme = scheme;
+ }
+
+ /**
+ * The actual file operation pattern.
+ */
+ @Pure
+ @NonNull
+ public FileOperationPattern getPattern() {
+ return this.pattern;
+ }
+
+ /**
+ * The actual file operation pattern.
+ */
+ public void setPattern(@NonNull final FileOperationPattern pattern) {
+ this.pattern = Preconditions.checkNotNull(pattern, "pattern");
+ }
+
+ /**
+ * A Uri like {@code file} or {@code untitled}.
+ */
+ @Pure
+ public String getScheme() {
+ return this.scheme;
+ }
+
+ /**
+ * A Uri like {@code file} or {@code untitled}.
+ */
+ public void setScheme(final String scheme) {
+ this.scheme = scheme;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("pattern", this.pattern);
+ b.add("scheme", this.scheme);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ FileOperationFilter other = (FileOperationFilter) obj;
+ if (this.pattern == null) {
+ if (other.pattern != null)
+ return false;
+ } else if (!this.pattern.equals(other.pattern))
+ return false;
+ if (this.scheme == null) {
+ if (other.scheme != null)
+ return false;
+ } else if (!this.scheme.equals(other.scheme))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.pattern== null) ? 0 : this.pattern.hashCode());
+ return prime * result + ((this.scheme== null) ? 0 : this.scheme.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/FileOperationOptions.java b/java/org/eclipse/lsp4j/FileOperationOptions.java
new file mode 100644
index 0000000..9e59629
--- /dev/null
+++ b/java/org/eclipse/lsp4j/FileOperationOptions.java
@@ -0,0 +1,89 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.lsp4j.FileOperationFilter;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The options for file operations.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class FileOperationOptions {
+ /**
+ * The actual filters.
+ */
+ @NonNull
+ private List<FileOperationFilter> filters = new ArrayList<FileOperationFilter>();
+
+ public FileOperationOptions() {
+ }
+
+ public FileOperationOptions(@NonNull final List<FileOperationFilter> filters) {
+ this.filters = Preconditions.<List<FileOperationFilter>>checkNotNull(filters, "filters");
+ }
+
+ /**
+ * The actual filters.
+ */
+ @Pure
+ @NonNull
+ public List<FileOperationFilter> getFilters() {
+ return this.filters;
+ }
+
+ /**
+ * The actual filters.
+ */
+ public void setFilters(@NonNull final List<FileOperationFilter> filters) {
+ this.filters = Preconditions.checkNotNull(filters, "filters");
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("filters", this.filters);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ FileOperationOptions other = (FileOperationOptions) obj;
+ if (this.filters == null) {
+ if (other.filters != null)
+ return false;
+ } else if (!this.filters.equals(other.filters))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.filters== null) ? 0 : this.filters.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/FileOperationPattern.java b/java/org/eclipse/lsp4j/FileOperationPattern.java
new file mode 100644
index 0000000..3eb5e61
--- /dev/null
+++ b/java/org/eclipse/lsp4j/FileOperationPattern.java
@@ -0,0 +1,180 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.FileOperationPatternOptions;
+import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
+import org.eclipse.lsp4j.util.Preconditions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * A pattern to describe in which file operation requests or notifications
+ * the server is interested in.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class FileOperationPattern {
+ /**
+ * The glob pattern to match. Glob patterns can have the following syntax:
+ * <ul>
+ * <li>`*` to match one or more characters in a path segment
+ * <li>`?` to match on one character in a path segment
+ * <li>`**` to match any number of path segments, including none
+ * <li>`{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
+ * <li>`[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
+ * <li>`[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
+ * </ul>
+ */
+ @NonNull
+ private String glob;
+
+ /**
+ * Whether to match files or folders with this pattern.
+ * <p>
+ * Matches both if undefined.
+ * <p>
+ * See {@link FileOperationPatternKind} for allowed values.
+ */
+ private String matches;
+
+ /**
+ * Additional options used during matching.
+ */
+ private FileOperationPatternOptions options;
+
+ public FileOperationPattern() {
+ }
+
+ public FileOperationPattern(@NonNull final String glob) {
+ this.glob = Preconditions.<String>checkNotNull(glob, "glob");
+ }
+
+ /**
+ * The glob pattern to match. Glob patterns can have the following syntax:
+ * <ul>
+ * <li>`*` to match one or more characters in a path segment
+ * <li>`?` to match on one character in a path segment
+ * <li>`**` to match any number of path segments, including none
+ * <li>`{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
+ * <li>`[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
+ * <li>`[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
+ * </ul>
+ */
+ @Pure
+ @NonNull
+ public String getGlob() {
+ return this.glob;
+ }
+
+ /**
+ * The glob pattern to match. Glob patterns can have the following syntax:
+ * <ul>
+ * <li>`*` to match one or more characters in a path segment
+ * <li>`?` to match on one character in a path segment
+ * <li>`**` to match any number of path segments, including none
+ * <li>`{}` to group sub patterns into an OR expression. (e.g. `**/*.{ts,js}` matches all TypeScript and JavaScript files)
+ * <li>`[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
+ * <li>`[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
+ * </ul>
+ */
+ public void setGlob(@NonNull final String glob) {
+ this.glob = Preconditions.checkNotNull(glob, "glob");
+ }
+
+ /**
+ * Whether to match files or folders with this pattern.
+ * <p>
+ * Matches both if undefined.
+ * <p>
+ * See {@link FileOperationPatternKind} for allowed values.
+ */
+ @Pure
+ public String getMatches() {
+ return this.matches;
+ }
+
+ /**
+ * Whether to match files or folders with this pattern.
+ * <p>
+ * Matches both if undefined.
+ * <p>
+ * See {@link FileOperationPatternKind} for allowed values.
+ */
+ public void setMatches(final String matches) {
+ this.matches = matches;
+ }
+
+ /**
+ * Additional options used during matching.
+ */
+ @Pure
+ public FileOperationPatternOptions getOptions() {
+ return this.options;
+ }
+
+ /**
+ * Additional options used during matching.
+ */
+ public void setOptions(final FileOperationPatternOptions options) {
+ this.options = options;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("glob", this.glob);
+ b.add("matches", this.matches);
+ b.add("options", this.options);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ FileOperationPattern other = (FileOperationPattern) obj;
+ if (this.glob == null) {
+ if (other.glob != null)
+ return false;
+ } else if (!this.glob.equals(other.glob))
+ return false;
+ if (this.matches == null) {
+ if (other.matches != null)
+ return false;
+ } else if (!this.matches.equals(other.matches))
+ return false;
+ if (this.options == null) {
+ if (other.options != null)
+ return false;
+ } else if (!this.options.equals(other.options))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.glob== null) ? 0 : this.glob.hashCode());
+ result = prime * result + ((this.matches== null) ? 0 : this.matches.hashCode());
+ return prime * result + ((this.options== null) ? 0 : this.options.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/FileOperationPatternKind.java b/java/org/eclipse/lsp4j/FileOperationPatternKind.java
new file mode 100644
index 0000000..0deda28
--- /dev/null
+++ b/java/org/eclipse/lsp4j/FileOperationPatternKind.java
@@ -0,0 +1,34 @@
+/******************************************************************************
+ * Copyright (c) 2020 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ ******************************************************************************/
+package org.eclipse.lsp4j;
+
+/**
+ * A pattern kind describing if a glob pattern matches a file a folder or
+ * both.
+ *
+ * Since 3.16.0
+ */
+public final class FileOperationPatternKind {
+
+ private FileOperationPatternKind() {
+ }
+
+ /**
+ * The pattern matches a file only.
+ */
+ public static final String File = "file";
+
+ /**
+ * The pattern matches a folder only.
+ */
+ public static final String Folder = "folder";
+}
diff --git a/java/org/eclipse/lsp4j/FileOperationPatternOptions.java b/java/org/eclipse/lsp4j/FileOperationPatternOptions.java
new file mode 100644
index 0000000..4000651
--- /dev/null
+++ b/java/org/eclipse/lsp4j/FileOperationPatternOptions.java
@@ -0,0 +1,82 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * Matching options for the file operation pattern.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class FileOperationPatternOptions {
+ /**
+ * The pattern should be matched ignoring casing.
+ */
+ private Boolean ignoreCase;
+
+ public FileOperationPatternOptions() {
+ }
+
+ public FileOperationPatternOptions(final Boolean ignoreCase) {
+ this.ignoreCase = ignoreCase;
+ }
+
+ /**
+ * The pattern should be matched ignoring casing.
+ */
+ @Pure
+ public Boolean getIgnoreCase() {
+ return this.ignoreCase;
+ }
+
+ /**
+ * The pattern should be matched ignoring casing.
+ */
+ public void setIgnoreCase(final Boolean ignoreCase) {
+ this.ignoreCase = ignoreCase;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("ignoreCase", this.ignoreCase);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ FileOperationPatternOptions other = (FileOperationPatternOptions) obj;
+ if (this.ignoreCase == null) {
+ if (other.ignoreCase != null)
+ return false;
+ } else if (!this.ignoreCase.equals(other.ignoreCase))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ return 31 * 1 + ((this.ignoreCase== null) ? 0 : this.ignoreCase.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/FileOperationsServerCapabilities.java b/java/org/eclipse/lsp4j/FileOperationsServerCapabilities.java
new file mode 100644
index 0000000..9c398b9
--- /dev/null
+++ b/java/org/eclipse/lsp4j/FileOperationsServerCapabilities.java
@@ -0,0 +1,216 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.FileOperationOptions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The server is interested in file notifications/requests.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class FileOperationsServerCapabilities {
+ /**
+ * The server is interested in receiving didCreateFiles notifications.
+ */
+ private FileOperationOptions didCreate;
+
+ /**
+ * The server is interested in receiving willCreateFiles requests.
+ */
+ private FileOperationOptions willCreate;
+
+ /**
+ * The server is interested in receiving didRenameFiles notifications.
+ */
+ private FileOperationOptions didRename;
+
+ /**
+ * The server is interested in receiving willRenameFiles requests.
+ */
+ private FileOperationOptions willRename;
+
+ /**
+ * The server is interested in receiving didDeleteFiles file notifications.
+ */
+ private FileOperationOptions didDelete;
+
+ /**
+ * The server is interested in receiving willDeleteFiles file requests.
+ */
+ private FileOperationOptions willDelete;
+
+ public FileOperationsServerCapabilities() {
+ }
+
+ /**
+ * The server is interested in receiving didCreateFiles notifications.
+ */
+ @Pure
+ public FileOperationOptions getDidCreate() {
+ return this.didCreate;
+ }
+
+ /**
+ * The server is interested in receiving didCreateFiles notifications.
+ */
+ public void setDidCreate(final FileOperationOptions didCreate) {
+ this.didCreate = didCreate;
+ }
+
+ /**
+ * The server is interested in receiving willCreateFiles requests.
+ */
+ @Pure
+ public FileOperationOptions getWillCreate() {
+ return this.willCreate;
+ }
+
+ /**
+ * The server is interested in receiving willCreateFiles requests.
+ */
+ public void setWillCreate(final FileOperationOptions willCreate) {
+ this.willCreate = willCreate;
+ }
+
+ /**
+ * The server is interested in receiving didRenameFiles notifications.
+ */
+ @Pure
+ public FileOperationOptions getDidRename() {
+ return this.didRename;
+ }
+
+ /**
+ * The server is interested in receiving didRenameFiles notifications.
+ */
+ public void setDidRename(final FileOperationOptions didRename) {
+ this.didRename = didRename;
+ }
+
+ /**
+ * The server is interested in receiving willRenameFiles requests.
+ */
+ @Pure
+ public FileOperationOptions getWillRename() {
+ return this.willRename;
+ }
+
+ /**
+ * The server is interested in receiving willRenameFiles requests.
+ */
+ public void setWillRename(final FileOperationOptions willRename) {
+ this.willRename = willRename;
+ }
+
+ /**
+ * The server is interested in receiving didDeleteFiles file notifications.
+ */
+ @Pure
+ public FileOperationOptions getDidDelete() {
+ return this.didDelete;
+ }
+
+ /**
+ * The server is interested in receiving didDeleteFiles file notifications.
+ */
+ public void setDidDelete(final FileOperationOptions didDelete) {
+ this.didDelete = didDelete;
+ }
+
+ /**
+ * The server is interested in receiving willDeleteFiles file requests.
+ */
+ @Pure
+ public FileOperationOptions getWillDelete() {
+ return this.willDelete;
+ }
+
+ /**
+ * The server is interested in receiving willDeleteFiles file requests.
+ */
+ public void setWillDelete(final FileOperationOptions willDelete) {
+ this.willDelete = willDelete;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("didCreate", this.didCreate);
+ b.add("willCreate", this.willCreate);
+ b.add("didRename", this.didRename);
+ b.add("willRename", this.willRename);
+ b.add("didDelete", this.didDelete);
+ b.add("willDelete", this.willDelete);
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ FileOperationsServerCapabilities other = (FileOperationsServerCapabilities) obj;
+ if (this.didCreate == null) {
+ if (other.didCreate != null)
+ return false;
+ } else if (!this.didCreate.equals(other.didCreate))
+ return false;
+ if (this.willCreate == null) {
+ if (other.willCreate != null)
+ return false;
+ } else if (!this.willCreate.equals(other.willCreate))
+ return false;
+ if (this.didRename == null) {
+ if (other.didRename != null)
+ return false;
+ } else if (!this.didRename.equals(other.didRename))
+ return false;
+ if (this.willRename == null) {
+ if (other.willRename != null)
+ return false;
+ } else if (!this.willRename.equals(other.willRename))
+ return false;
+ if (this.didDelete == null) {
+ if (other.didDelete != null)
+ return false;
+ } else if (!this.didDelete.equals(other.didDelete))
+ return false;
+ if (this.willDelete == null) {
+ if (other.willDelete != null)
+ return false;
+ } else if (!this.willDelete.equals(other.willDelete))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.didCreate== null) ? 0 : this.didCreate.hashCode());
+ result = prime * result + ((this.willCreate== null) ? 0 : this.willCreate.hashCode());
+ result = prime * result + ((this.didRename== null) ? 0 : this.didRename.hashCode());
+ result = prime * result + ((this.willRename== null) ? 0 : this.willRename.hashCode());
+ result = prime * result + ((this.didDelete== null) ? 0 : this.didDelete.hashCode());
+ return prime * result + ((this.willDelete== null) ? 0 : this.willDelete.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/FileOperationsWorkspaceCapabilities.java b/java/org/eclipse/lsp4j/FileOperationsWorkspaceCapabilities.java
new file mode 100644
index 0000000..444362d
--- /dev/null
+++ b/java/org/eclipse/lsp4j/FileOperationsWorkspaceCapabilities.java
@@ -0,0 +1,219 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0,
+ * or the Eclipse Distribution License v. 1.0 which is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
+ */
+package org.eclipse.lsp4j;
+
+import org.eclipse.lsp4j.DynamicRegistrationCapabilities;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+/**
+ * The client has support for file requests/notifications.
+ * <p>
+ * Since 3.16.0
+ */
+@SuppressWarnings("all")
+public class FileOperationsWorkspaceCapabilities extends DynamicRegistrationCapabilities {
+ /**
+ * The client has support for sending didCreateFiles notifications.
+ */
+ private Boolean didCreate;
+
+ /**
+ * The client has support for sending willCreateFiles requests.
+ */
+ private Boolean willCreate;
+
+ /**
+ * The client has support for sending didRenameFiles notifications.
+ */
+ private Boolean didRename;
+
+ /**
+ * The client has support for sending willRenameFiles requests.
+ */
+ private Boolean willRename;
+
+ /**
+ * The client has support for sending didDeleteFiles notifications.
+ */
+ private Boolean didDelete;
+
+ /**
+ * The client has support for sending willDeleteFiles requests.
+ */
+ private Boolean willDelete;
+
+ public FileOperationsWorkspaceCapabilities() {
+ }
+
+ /**
+ * The client has support for sending didCreateFiles notifications.
+ */
+ @Pure
+ public Boolean getDidCreate() {
+ return this.didCreate;
+ }
+
+ /**
+ * The client has support for sending didCreateFiles notifications.
+ */
+ public void setDidCreate(final Boolean didCreate) {
+ this.didCreate = didCreate;
+ }
+
+ /**
+ * The client has support for sending willCreateFiles requests.
+ */
+ @Pure
+ public Boolean getWillCreate() {
+ return this.willCreate;
+ }
+
+ /**
+ * The client has support for sending willCreateFiles requests.
+ */
+ public void setWillCreate(final Boolean willCreate) {
+ this.willCreate = willCreate;
+ }
+
+ /**
+ * The client has support for sending didRenameFiles notifications.
+ */
+ @Pure
+ public Boolean getDidRename() {
+ return this.didRename;
+ }
+
+ /**
+ * The client has support for sending didRenameFiles notifications.
+ */
+ public void setDidRename(final Boolean didRename) {
+ this.didRename = didRename;
+ }
+
+ /**
+ * The client has support for sending willRenameFiles requests.
+ */
+ @Pure
+ public Boolean getWillRename() {
+ return this.willRename;
+ }
+
+ /**
+ * The client has support for sending willRenameFiles requests.
+ */
+ public void setWillRename(final Boolean willRename) {
+ this.willRename = willRename;
+ }
+
+ /**
+ * The client has support for sending didDeleteFiles notifications.
+ */
+ @Pure
+ public Boolean getDidDelete() {
+ return this.didDelete;
+ }
+
+ /**
+ * The client has support for sending didDeleteFiles notifications.
+ */
+ public void setDidDelete(final Boolean didDelete) {
+ this.didDelete = didDelete;
+ }
+
+ /**
+ * The client has support for sending willDeleteFiles requests.
+ */
+ @Pure
+ public Boolean getWillDelete() {
+ return this.willDelete;
+ }
+
+ /**
+ * The client has support for sending willDeleteFiles requests.
+ */
+ public void setWillDelete(final Boolean willDelete) {
+ this.willDelete = willDelete;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("didCreate", this.didCreate);
+ b.add("willCreate", this.willCreate);
+ b.add("didRename", this.didRename);
+ b.add("willRename", this.willRename);
+ b.add("didDelete", this.didDelete);
+ b.add("willDelete", this.willDelete);
+ b.add("dynamicRegistration", getDynamicRegistration());
+ return b.toString();
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ if (!super.equals(obj))
+ return false;
+ FileOperationsWorkspaceCapabilities other = (FileOperationsWorkspaceCapabilities) obj;
+ if (this.didCreate == null) {
+ if (other.didCreate != null)
+ return false;
+ } else if (!this.didCreate.equals(other.didCreate))
+ return false;
+ if (this.willCreate == null) {
+ if (other.willCreate != null)
+ return false;
+ } else if (!this.willCreate.equals(other.willCreate))
+ return false;
+ if (this.didRename == null) {
+ if (other.didRename != null)
+ return false;
+ } else if (!this.didRename.equals(other.didRename))
+ return false;
+ if (this.willRename == null) {
+ if (other.willRename != null)
+ return false;
+ } else if (!this.willRename.equals(other.willRename))
+ return false;
+ if (this.didDelete == null) {
+ if (other.didDelete != null)
+ return false;
+ } else if (!this.didDelete.equals(other.didDelete))
+ return false;
+ if (this.willDelete == null) {
+ if (other.willDelete != null)
+ return false;
+ } else if (!this.willDelete.equals(other.willDelete))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((this.didCreate== null) ? 0 : this.didCreate.hashCode());
+ result = prime * result + ((this.willCreate== null) ? 0 : this.willCreate.hashCode());
+ result = prime * result + ((this.didRename== null) ? 0 : this.didRename.hashCode());
+ result = prime * result + ((this.willRename== null) ? 0 : this.willRename.hashCode());
+ result = prime * result + ((this.didDelete== null) ? 0 : this.didDelete.hashCode());
+ return prime * result + ((this.willDelete== null) ? 0 : this.willDelete.hashCode());
+ }
+}
diff --git a/java/org/eclipse/lsp4j/FileRename.java b/java/org/eclipse/lsp4j/FileRename.java
new file mode 100644
index 0000000..c68a3c1
--- /dev/null
+++ b/java/org/eclipse/lsp4j/FileRename.java
@@ -0,0 +1,118 @@
+/**
+ * Copyright (c) 2016-2018 TypeFox and others.
+ *