- clone from eclipse jdtls
- compile with
cd eclipse.jdt.ls && ./mvnw clean install -DskipTests
- download google java format
- create launch-jdtls.sh
#!/bin/sh
import io.micronaut.http.HttpResponse | |
import io.micronaut.http.MutableHttpRequest | |
import io.micronaut.http.annotation.Filter | |
import io.micronaut.http.filter.ClientFilterChain | |
import io.micronaut.http.filter.HttpClientFilter | |
import mu.KotlinLogging | |
import org.reactivestreams.Publisher | |
import org.slf4j.MDC | |
import java.util.* |
public static void main(String[] args) { | |
try (var inputStream = Main.class.getClassLoader().getResourceAsStream("application.yml")) { | |
var yamlToProperties = new YamlToProperties(inputStream); | |
Map<String, Object> stringObjectMap = yamlToProperties.asProperties(); | |
stringObjectMap.forEach((key, value) -> { | |
System.out.println("Key: " + key + ", Value: " + value); | |
}); | |
} catch (IOException e) { | |
System.out.println(e.getMessage()); | |
} |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<link rel="stylesheet" href="css/style.css" /> | |
<title>Bedim Code</title> | |
</head> | |
<body id="body-pd"> |
package com.company.retrofit2.annotation; | |
import java.lang.annotation.Documented; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.Target; | |
import static java.lang.annotation.ElementType.METHOD; | |
import static java.lang.annotation.RetentionPolicy.RUNTIME; | |
/** |
import arrow.core.Either | |
import okhttp3.Request | |
import okio.Timeout | |
import retrofit2.Call | |
import retrofit2.CallAdapter | |
import retrofit2.Callback | |
import retrofit2.Response | |
import retrofit2.Retrofit | |
import java.io.IOException |
public record Actor(int id, String firstName, String lastName) {} |
package org.richard.amortization | |
import kotlin.math.pow | |
object Application { | |
private const val NUMBER_OF_MONTHS_IN_YEAR = 12 | |
private fun interest(principal: Money, rate: Double): Money { | |
return Money(rate * principal.value()) |
@JsonDeserialize(using = CustomDeserializer.class) | |
public abstract class BaseClass { | |
private String commonProp; | |
} | |
// Important to override the base class' usage of CustomDeserializer which produces an infinite loop | |
@JsonDeserialize(using = JsonDeserializer.None.class) | |
public class ClassA extends BaseClass { | |
public Mono<Person> load(UUID id) { | |
return API.Match(tryLoadPerson(id)).of( | |
Case($Success($()), Mono::just), | |
Case($Failure($(instanceOf(IllegalArgumentException.class))), Mono::error), | |
Case($Failure($()), x -> Mono.error(new RuntimeException("unknown error"))) | |
); | |
} | |
private Try<Person> tryLoadPerson(UUID id) { |
cd eclipse.jdt.ls && ./mvnw clean install -DskipTests
#!/bin/sh