private static String getOptionValue(Either3<String, Number, Boolean> option) { if (option.isFirst()) { return option.getFirst(); } else if (option.isSecond()) { return option.getSecond().toString(); } else { return option.getThird().toString(); } }
public JsonElement toJsonElement() { JsonObject result = new JsonObject(); if (getOptions() == null) { setOptions((org.eclipse.lsp4j.FormattingOptions)null); } else { JsonObject optionsVal = new JsonObject(); for (Entry<String, org.eclipse.lsp4j.jsonrpc.messages.Either3<java.lang.String, java.lang.Number, java.lang.Boolean>> optionsValX : getOptions().entrySet()) { JsonElement optionsValY; if (optionsValX.getValue().isFirst()) { JsonElement optionsValYe = optionsValX.getValue().getFirst() == null ? JsonNull.INSTANCE : new JsonPrimitive(optionsValX.getValue().getFirst());; optionsValY= optionsValYe; } else if (optionsValX.getValue().isSecond()) { JsonElement optionsValYe = optionsValX.getValue().getSecond() == null ? JsonNull.INSTANCE : new JsonPrimitive(optionsValX.getValue().getSecond().doubleValue());; optionsValY= optionsValYe; } else { JsonElement optionsValYe = optionsValX.getValue().getThird() == null ? JsonNull.INSTANCE : new JsonPrimitive(optionsValX.getValue().getThird());; optionsValY= optionsValYe; } optionsVal.add(optionsValX.getKey().toString(), optionsValY); } result.add("options", optionsVal); } if (getTextDocument() == null) { setTextDocument((org.eclipse.lsp4j.TextDocumentIdentifier)null); } else { JsonElement textDocumentVal = getTextDocument() == null ? JsonNull.INSTANCE : ((TextDocumentIdentifierDto)getTextDocument()).toJsonElement();; result.add("textDocument", textDocumentVal); } return result; }
boolean _isSecond = it.isSecond(); if (_isSecond) { _matched=true;
boolean _isSecond = it.isSecond(); if (_isSecond) { _matched=true;
JsonElement optionsValYe = optionsValX.getValue().getFirst() == null ? JsonNull.INSTANCE : new JsonPrimitive(optionsValX.getValue().getFirst());; optionsValY= optionsValYe; } else if (optionsValX.getValue().isSecond()) { JsonElement optionsValYe = optionsValX.getValue().getSecond() == null ? JsonNull.INSTANCE : new JsonPrimitive(optionsValX.getValue().getSecond().doubleValue());; optionsValY= optionsValYe;
JsonElement optionsValYe = optionsValX.getValue().getFirst() == null ? JsonNull.INSTANCE : new JsonPrimitive(optionsValX.getValue().getFirst());; optionsValY= optionsValYe; } else if (optionsValX.getValue().isSecond()) { JsonElement optionsValYe = optionsValX.getValue().getSecond() == null ? JsonNull.INSTANCE : new JsonPrimitive(optionsValX.getValue().getSecond().doubleValue());; optionsValY= optionsValYe;
public DocumentFormattingParamsDto(org.eclipse.lsp4j.DocumentFormattingParams o) { if (o.getOptions() == null) { setOptions((org.eclipse.lsp4j.FormattingOptions)null); } else { org.eclipse.lsp4j.FormattingOptions optionsVal= new org.eclipse.lsp4j.FormattingOptions(); for (Entry<String, org.eclipse.lsp4j.jsonrpc.messages.Either3<java.lang.String, java.lang.Number, java.lang.Boolean>> optionsValX : o.getOptions().entrySet()) { org.eclipse.lsp4j.jsonrpc.messages.Either3<java.lang.String, java.lang.Number, java.lang.Boolean> optionsValY; if (optionsValX.getValue().isFirst()) { java.lang.String optionsValYe = (java.lang.String)makeDto(optionsValX.getValue().getFirst());; optionsValY= Either3.forFirst(optionsValYe); } else if (optionsValX.getValue().isSecond()) { java.lang.Number optionsValYe = (java.lang.Number)makeDto(optionsValX.getValue().getSecond());; optionsValY= Either3.forSecond(optionsValYe); } else { java.lang.Boolean optionsValYe = (java.lang.Boolean)makeDto(optionsValX.getValue().getThird());; optionsValY= Either3.forThird(optionsValYe); } optionsVal.put(optionsValX.getKey(), optionsValY); } setOptions((org.eclipse.lsp4j.FormattingOptions)optionsVal); } if (o.getTextDocument() == null) { setTextDocument((org.eclipse.lsp4j.TextDocumentIdentifier)null); } else { org.eclipse.lsp4j.TextDocumentIdentifier textDocumentVal = new TextDocumentIdentifierDto(o.getTextDocument()); setTextDocument((org.eclipse.lsp4j.TextDocumentIdentifier)textDocumentVal); } }
java.lang.String optionsValYe = (java.lang.String)makeDto(optionsValX.getValue().getFirst());; optionsValY= Either3.forFirst(optionsValYe); } else if (optionsValX.getValue().isSecond()) { java.lang.Number optionsValYe = (java.lang.Number)makeDto(optionsValX.getValue().getSecond());; optionsValY= Either3.forSecond(optionsValYe);
java.lang.String optionsValYe = (java.lang.String)makeDto(optionsValX.getValue().getFirst());; optionsValY= Either3.forFirst(optionsValYe); } else if (optionsValX.getValue().isSecond()) { java.lang.Number optionsValYe = (java.lang.Number)makeDto(optionsValX.getValue().getSecond());; optionsValY= Either3.forSecond(optionsValYe);