Skip to content

Commit

Permalink
[#528] remove some runtime dependencies to xbase.lib
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Dietrich <[email protected]>
  • Loading branch information
cdietrich committed Mar 26, 2021
1 parent cffa7f8 commit aca6eba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3629,7 +3629,7 @@ class FormattingOptions extends LinkedHashMap<String, Either3<String, Number, Bo
*/
@Deprecated
def Map<String, String> getProperties() {
val properties = newLinkedHashMap
val properties = new LinkedHashMap<String,String>
for (entry : entrySet) {
val value = switch it: entry.value {
case isFirst: getFirst
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import org.eclipse.lsp4j.MarkedString
import org.eclipse.lsp4j.MarkupContent
import org.eclipse.lsp4j.generator.TypeAdapterImpl
import org.eclipse.lsp4j.jsonrpc.messages.Either
import com.google.common.collect.Lists

/**
* A type adapter for the Hover protocol type.
Expand All @@ -37,15 +38,15 @@ class HoverTypeAdapter {
protected def readContents(JsonReader in) throws IOException {
val nextToken = in.peek()
if (nextToken == JsonToken.STRING) {
val List<Either<String, MarkedString>> value = newArrayList(Either.forLeft(in.nextString))
val List<Either<String, MarkedString>> value = Lists.newArrayList(Either.forLeft(in.nextString))
return Either.forLeft(value)
} else if (nextToken == JsonToken.BEGIN_ARRAY) {
val value = gson.fromJson(in, LIST_STRING_MARKEDSTRING.type)
return Either.forLeft(value)
} else {
val object = new JsonParser().parse(in) as JsonObject
if (object.has("language")) {
val List<Either<String, MarkedString>> value = newArrayList(Either.forRight(gson.fromJson(object, MarkedString)))
val List<Either<String, MarkedString>> value = Lists.newArrayList(Either.forRight(gson.fromJson(object, MarkedString)))
return Either.forLeft(value)
} else {
return Either.forRight(gson.fromJson(object, MarkupContent))
Expand Down

0 comments on commit aca6eba

Please sign in to comment.