Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove dependency on xtext's @pure and ToStringBuilder

This commit removes ToStringBuilder.

lsp4j.debug depends on xtext base at runtime, because the generated
POJOs import org.eclipse.xtext.xbase.lib.Pure and
org.eclipse.xtext.xbase.lib.util.ToStringBuilder. Neither @pure
nor ToStringBuilder are required by lsp4j.debug's functionality.
Removes the xtext dependency to shrink the set of lsp4j.debug's
dependencies.
  • Loading branch information
lemmy committed Jan 19, 2021
1 parent 8f03f69 commit 1a4fad0
Show file tree
Hide file tree
Showing 383 changed files with 0 additions and 3,919 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
package org.eclipse.lsp4j.debug;

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

/**
* Arguments for 'attach' request. Additional attributes are implementation specific.
Expand Down Expand Up @@ -57,13 +56,6 @@ public void set__restart(final Object __restart) {
this.__restart = __restart;
}

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

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

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

/**
* Information about a Breakpoint created in setBreakpoints, setFunctionBreakpoints, setInstructionBreakpoints, or
Expand Down Expand Up @@ -296,22 +295,6 @@ public void setOffset(final Integer offset) {
this.offset = offset;
}

@Override
public String toString() {
ToStringBuilder b = new ToStringBuilder(this);
b.add("id", this.id);
b.add("verified", this.verified);
b.add("message", this.message);
b.add("source", this.source);
b.add("line", this.line);
b.add("column", this.column);
b.add("endLine", this.endLine);
b.add("endColumn", this.endColumn);
b.add("instructionReference", this.instructionReference);
b.add("offset", this.offset);
return b.toString();
}

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.eclipse.lsp4j.debug.util.Preconditions;
import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;

/**
* The event indicates that some information about a breakpoint has changed.
Expand Down Expand Up @@ -72,14 +71,6 @@ public void setBreakpoint(@NonNull final Breakpoint breakpoint) {
this.breakpoint = Preconditions.checkNotNull(breakpoint, "breakpoint");
}

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

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
package org.eclipse.lsp4j.debug;

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

/**
* Properties of a breakpoint location returned from the 'breakpointLocations' request.
Expand Down Expand Up @@ -117,16 +116,6 @@ public void setEndColumn(final Integer endColumn) {
this.endColumn = endColumn;
}

@Override
public String toString() {
ToStringBuilder b = new ToStringBuilder(this);
b.add("line", this.line);
b.add("column", this.column);
b.add("endLine", this.endLine);
b.add("endColumn", this.endColumn);
return b.toString();
}

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.eclipse.lsp4j.debug.util.Preconditions;
import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;

/**
* Arguments for 'breakpointLocations' request.
Expand Down Expand Up @@ -154,17 +153,6 @@ public void setEndColumn(final Integer endColumn) {
this.endColumn = endColumn;
}

@Override
public String toString() {
ToStringBuilder b = new ToStringBuilder(this);
b.add("source", this.source);
b.add("line", this.line);
b.add("column", this.column);
b.add("endLine", this.endLine);
b.add("endColumn", this.endColumn);
return b.toString();
}

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.eclipse.lsp4j.debug.util.Preconditions;
import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;

/**
* Response to 'breakpointLocations' request.
Expand Down Expand Up @@ -47,13 +46,6 @@ public void setBreakpoints(@NonNull final BreakpointLocation[] breakpoints) {
this.breakpoints = Preconditions.checkNotNull(breakpoints, "breakpoints");
}

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

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
package org.eclipse.lsp4j.debug;

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

/**
* Arguments for 'cancel' request.
Expand Down Expand Up @@ -83,14 +82,6 @@ public void setProgressId(final String progressId) {
this.progressId = progressId;
}

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

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.eclipse.lsp4j.debug.ColumnDescriptor;
import org.eclipse.lsp4j.debug.ExceptionBreakpointsFilter;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;

/**
* Information about the capabilities of a debug adapter.
Expand Down Expand Up @@ -945,47 +944,6 @@ public void setSupportsInstructionBreakpoints(final Boolean supportsInstructionB
this.supportsInstructionBreakpoints = supportsInstructionBreakpoints;
}

@Override
public String toString() {
ToStringBuilder b = new ToStringBuilder(this);
b.add("supportsConfigurationDoneRequest", this.supportsConfigurationDoneRequest);
b.add("supportsFunctionBreakpoints", this.supportsFunctionBreakpoints);
b.add("supportsConditionalBreakpoints", this.supportsConditionalBreakpoints);
b.add("supportsHitConditionalBreakpoints", this.supportsHitConditionalBreakpoints);
b.add("supportsEvaluateForHovers", this.supportsEvaluateForHovers);
b.add("exceptionBreakpointFilters", this.exceptionBreakpointFilters);
b.add("supportsStepBack", this.supportsStepBack);
b.add("supportsSetVariable", this.supportsSetVariable);
b.add("supportsRestartFrame", this.supportsRestartFrame);
b.add("supportsGotoTargetsRequest", this.supportsGotoTargetsRequest);
b.add("supportsStepInTargetsRequest", this.supportsStepInTargetsRequest);
b.add("supportsCompletionsRequest", this.supportsCompletionsRequest);
b.add("completionTriggerCharacters", this.completionTriggerCharacters);
b.add("supportsModulesRequest", this.supportsModulesRequest);
b.add("additionalModuleColumns", this.additionalModuleColumns);
b.add("supportedChecksumAlgorithms", this.supportedChecksumAlgorithms);
b.add("supportsRestartRequest", this.supportsRestartRequest);
b.add("supportsExceptionOptions", this.supportsExceptionOptions);
b.add("supportsValueFormattingOptions", this.supportsValueFormattingOptions);
b.add("supportsExceptionInfoRequest", this.supportsExceptionInfoRequest);
b.add("supportTerminateDebuggee", this.supportTerminateDebuggee);
b.add("supportsDelayedStackTraceLoading", this.supportsDelayedStackTraceLoading);
b.add("supportsLoadedSourcesRequest", this.supportsLoadedSourcesRequest);
b.add("supportsLogPoints", this.supportsLogPoints);
b.add("supportsTerminateThreadsRequest", this.supportsTerminateThreadsRequest);
b.add("supportsSetExpression", this.supportsSetExpression);
b.add("supportsTerminateRequest", this.supportsTerminateRequest);
b.add("supportsDataBreakpoints", this.supportsDataBreakpoints);
b.add("supportsReadMemoryRequest", this.supportsReadMemoryRequest);
b.add("supportsDisassembleRequest", this.supportsDisassembleRequest);
b.add("supportsCancelRequest", this.supportsCancelRequest);
b.add("supportsBreakpointLocationsRequest", this.supportsBreakpointLocationsRequest);
b.add("supportsClipboardContext", this.supportsClipboardContext);
b.add("supportsSteppingGranularity", this.supportsSteppingGranularity);
b.add("supportsInstructionBreakpoints", this.supportsInstructionBreakpoints);
return b.toString();
}

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.eclipse.lsp4j.debug.util.Preconditions;
import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;

/**
* The event indicates that one or more capabilities have changed.
Expand Down Expand Up @@ -52,13 +51,6 @@ public void setCapabilities(@NonNull final Capabilities capabilities) {
this.capabilities = Preconditions.checkNotNull(capabilities, "capabilities");
}

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

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.eclipse.lsp4j.debug.util.Preconditions;
import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;

/**
* The checksum of an item calculated by the specified algorithm.
Expand Down Expand Up @@ -66,14 +65,6 @@ public void setChecksum(@NonNull final String checksum) {
this.checksum = Preconditions.checkNotNull(checksum, "checksum");
}

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

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.eclipse.lsp4j.debug.util.Preconditions;
import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;

/**
* A ColumnDescriptor specifies what module attribute to show in a column of the ModulesView, how to format it,
Expand Down Expand Up @@ -148,17 +147,6 @@ public void setWidth(final Integer width) {
this.width = width;
}

@Override
public String toString() {
ToStringBuilder b = new ToStringBuilder(this);
b.add("attributeName", this.attributeName);
b.add("label", this.label);
b.add("format", this.format);
b.add("type", this.type);
b.add("width", this.width);
return b.toString();
}

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.eclipse.lsp4j.debug.util.Preconditions;
import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;

/**
* CompletionItems are the suggestions returned from the CompletionsRequest.
Expand Down Expand Up @@ -268,20 +267,6 @@ public void setSelectionLength(final Integer selectionLength) {
this.selectionLength = selectionLength;
}

@Override
public String toString() {
ToStringBuilder b = new ToStringBuilder(this);
b.add("label", this.label);
b.add("text", this.text);
b.add("sortText", this.sortText);
b.add("type", this.type);
b.add("start", this.start);
b.add("length", this.length);
b.add("selectionStart", this.selectionStart);
b.add("selectionLength", this.selectionLength);
return b.toString();
}

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.eclipse.lsp4j.debug.util.Preconditions;
import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;

/**
* Arguments for 'completions' request.
Expand Down Expand Up @@ -124,16 +123,6 @@ public void setLine(final Integer line) {
this.line = line;
}

@Override
public String toString() {
ToStringBuilder b = new ToStringBuilder(this);
b.add("frameId", this.frameId);
b.add("text", this.text);
b.add("column", this.column);
b.add("line", this.line);
return b.toString();
}

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import org.eclipse.lsp4j.debug.util.Preconditions;
import org.eclipse.lsp4j.jsonrpc.validation.NonNull;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;

/**
* Response to 'completions' request.
Expand Down Expand Up @@ -45,13 +44,6 @@ public void setTargets(@NonNull final CompletionItem[] targets) {
this.targets = Preconditions.checkNotNull(targets, "targets");
}

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

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,12 @@
package org.eclipse.lsp4j.debug;

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

/**
* Arguments for 'configurationDone' request.
*/
@SuppressWarnings("all")
public class ConfigurationDoneArguments {
@Override
public String toString() {
ToStringBuilder b = new ToStringBuilder(this);
return b.toString();
}

@Override
@Pure
public boolean equals(final Object obj) {
Expand Down
Loading

0 comments on commit 1a4fad0

Please sign in to comment.