Search in sources :

Example 1 with DelegateServer

use of org.graalvm.tools.lsp.server.types.LanguageServer.DelegateServer in project graal by oracle.

the class DelegateServers method mergeResults.

public Object mergeResults(Object id, Object result) {
    Object allResults = result;
    for (DelegateServer ds : delegateServers) {
        try {
            JSONObject message = ds.awaitMessage(id);
            if (message != null && logger.isLoggable(Level.FINER)) {
                String format = "[Trace - %s] Received response from %s: %s";
                logger.log(Level.FINER, String.format(format, Instant.now().toString(), ds.toString(), message.toString()));
            }
            allResults = mergeResults(allResults, message);
        } catch (InterruptedException iex) {
        }
    }
    return allResults;
}
Also used : JSONObject(com.oracle.truffle.tools.utils.json.JSONObject) JSONObject(com.oracle.truffle.tools.utils.json.JSONObject) DelegateServer(org.graalvm.tools.lsp.server.types.LanguageServer.DelegateServer)

Aggregations

JSONObject (com.oracle.truffle.tools.utils.json.JSONObject)1 DelegateServer (org.graalvm.tools.lsp.server.types.LanguageServer.DelegateServer)1