// TODO consider showing actual source code instead of just types and names
private void resolveDetail(CompletionItem item, CompletionData data, Tree tree) {
        if (tree instanceof MethodTree) {
            var method = (MethodTree) tree;
            var parameters = new StringJoiner(", ");
            for (var p : method.getParameters()) {
                parameters.add(p.getType() + " " + p.getName());
            }
            item.detail = method.getReturnType() + " " + method.getName() + "(" + parameters + ")";
            if (!method.getThrows().isEmpty()) {
                var exceptions = new StringJoiner(", ");
                for (var e : method.getThrows()) {
                    exceptions.add(e.toString());
                }
                item.detail += " throws " + exceptions;
            }
            if (data.plusOverloads != 0) {
                item.detail += " (+" + data.plusOverloads + " overloads)";
            }
        }
    }
private void resolveDetail(CompletionItem item, CompletionData data, Tree tree) {
if (tree instanceof MethodTree) {
var method = (MethodTree) tree;
var parameters = new StringJoiner(", ");
for (var p : method.getParameters()) {
parameters.add(p.getType() + " " + p.getName());
}
item.detail = method.getReturnType() + " " + method.getName() + "(" + parameters + ")";
if (!method.getThrows().isEmpty()) {
var exceptions = new StringJoiner(", ");
for (var e : method.getThrows()) {
exceptions.add(e.toString());
}
item.detail += " throws " + exceptions;
}
if (data.plusOverloads != 0) {
item.detail += " (+" + data.plusOverloads + " overloads)";
}
}
}
private void resolveDetail(CompletionItem item, CompletionData data, Tree tree) {
if (tree instanceof MethodTree) {
var method = (MethodTree) tree;
var parameters = new StringJoiner(", ");
for (var p : method.getParameters()) {
parameters.add(p.getType() + " " + p.getName());
}
item.detail = method.getReturnType() + " " + method.getName() + "(" + parameters + ")";
if (!method.getThrows().isEmpty()) {
var exceptions = new StringJoiner(", ");
for (var e : method.getThrows()) {
exceptions.add(e.toString());
}
item.detail += " throws " + exceptions;
}
if (data.plusOverloads != 0) {
item.detail += " (+" + data.plusOverloads + " overloads)";
}
}
}
private void resolveDetail(CompletionItem item, CompletionData data, Tree tree) {
if (tree instanceof MethodTree) {
var method = (MethodTree) tree;
var parameters = new StringJoiner(", ");
for (var p : method.getParameters()) {
parameters.add(p.getType() + " " + p.getName());
}
item.detail = method.getReturnType() + " " + method.getName() + "(" + parameters + ")";
if (!method.getThrows().isEmpty()) {
var exceptions = new StringJoiner(", ");
for (var e : method.getThrows()) {
exceptions.add(e.toString());
}
item.detail += " throws " + exceptions;
}
if (data.plusOverloads != 0) {
item.detail += " (+" + data.plusOverloads + " overloads)";
}
}
}