Skip to content

Commit

Permalink
commit generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
jnt0r committed Sep 12, 2023
1 parent 45d115c commit 43826ca
Showing 1 changed file with 11 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
*/
package org.eclipse.xtext.testing;

import com.google.common.annotations.Beta;
import com.google.common.base.Objects;
import com.google.common.collect.Iterables;
import com.google.inject.Binder;
import com.google.inject.Guice;
import com.google.inject.Inject;
Expand Down Expand Up @@ -119,7 +116,6 @@
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Pair;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.eclipse.xtext.xbase.lib.Pure;
import org.eclipse.xtext.xbase.lib.StringExtensions;
import org.junit.After;
import org.junit.Assert;
Expand All @@ -131,8 +127,7 @@
* @author Sven Efftinge - Initial contribution and API
* Rubén Porras Campo - Semantic Tokens Full
*/
@FinalFieldsConstructor
@SuppressWarnings("all")
/* @FinalFieldsConstructor */@SuppressWarnings("all")
public abstract class AbstractLanguageServerTest implements Endpoint {
/**
* A request manager that will run the given read and write actions in the same thread immediately, sequentially.
Expand Down Expand Up @@ -190,58 +185,22 @@ public synchronized <U extends Object, V extends Object> CompletableFuture<V> ru
}
}

@Accessors
public static class TestCodeLensConfiguration extends TextDocumentPositionConfiguration {
/* @Accessors
*/public static class TestCodeLensConfiguration extends TextDocumentPositionConfiguration {
private String expectedCodeLensItems = "";

private Procedure1<? super List<? extends CodeLens>> assertCodeLenses = null;

@Pure
public String getExpectedCodeLensItems() {
return this.expectedCodeLensItems;
}

public void setExpectedCodeLensItems(final String expectedCodeLensItems) {
this.expectedCodeLensItems = expectedCodeLensItems;
}

@Pure
public Procedure1<? super List<? extends CodeLens>> getAssertCodeLenses() {
return this.assertCodeLenses;
}

public void setAssertCodeLenses(final Procedure1<? super List<? extends CodeLens>> assertCodeLenses) {
this.assertCodeLenses = assertCodeLenses;
}
}

@Accessors
public static class TestCodeActionConfiguration extends TextDocumentPositionConfiguration {
/* @Accessors
*/public static class TestCodeActionConfiguration extends TextDocumentPositionConfiguration {
private String expectedCodeActions = "";

private Procedure1<? super List<Either<Command, CodeAction>>> assertCodeActions = null;

@Pure
public String getExpectedCodeActions() {
return this.expectedCodeActions;
}

public void setExpectedCodeActions(final String expectedCodeActions) {
this.expectedCodeActions = expectedCodeActions;
}

@Pure
public Procedure1<? super List<Either<Command, CodeAction>>> getAssertCodeActions() {
return this.assertCodeActions;
}

public void setAssertCodeActions(final Procedure1<? super List<Either<Command, CodeAction>>> assertCodeActions) {
this.assertCodeActions = assertCodeActions;
}
}

@Accessors
protected final String fileExtension;
/* @Accessors
*/protected final String fileExtension;

protected static final String TEST_PROJECT_PATH = "/test-data/test-project";

Expand Down Expand Up @@ -724,7 +683,7 @@ protected String _toExpectation(final CompletionItem it) {
}
}
} else {
if (((it.getInsertText() != null) && (!Objects.equal(it.getInsertText(), it.getLabel())))) {
if (((it.getInsertText() != null) && (!.equal(it.getInsertText(), it.getLabel())))) {
_builder.append(" -> ");
String _insertText = it.getInsertText();
_builder.append(_insertText);
Expand Down Expand Up @@ -1077,8 +1036,8 @@ protected String _toExpectation(final VersionedTextDocumentIdentifier v) {
return _builder.toString();
}

@Beta
protected void testSemanticTokensFull(final Procedure1<? super SemanticTokensFullConfiguration> configurator) {
/* @Beta
*/protected void testSemanticTokensFull(final Procedure1<? super SemanticTokensFullConfiguration> configurator) {
try {
@Extension
final SemanticTokensFullConfiguration configuration = new SemanticTokensFullConfiguration();
Expand Down Expand Up @@ -1547,7 +1506,7 @@ protected Map<String, List<Diagnostic>> getDiagnostics() {
final Function1<Pair<String, Object>, Object> _function_1 = (Pair<String, Object> it_1) -> {
return it_1.getValue();
};
Iterable<PublishDiagnosticsParams> _filter = Iterables.<PublishDiagnosticsParams>filter(ListExtensions.<Pair<String, Object>, Object>map(this.notifications, _function_1), PublishDiagnosticsParams.class);
Iterable<PublishDiagnosticsParams> _filter = <PublishDiagnosticsParams>.PublishDiagnosticsParamsfilter(ListExtensions.<Pair<String, Object>, Object>map(this.notifications, _function_1), PublishDiagnosticsParams.class);
for (final PublishDiagnosticsParams diagnostic : _filter) {
result.put(diagnostic.getUri(), diagnostic.getDiagnostics());
}
Expand Down Expand Up @@ -1619,14 +1578,4 @@ protected String toExpectation(final Object it) {
Arrays.<Object>asList(it).toString());
}
}

public AbstractLanguageServerTest(final String fileExtension) {
super();
this.fileExtension = fileExtension;
}

@Pure
public String getFileExtension() {
return this.fileExtension;
}
}

0 comments on commit 43826ca

Please sign in to comment.