use of io.typefox.lsapi.impl.PublishDiagnosticsParamsImpl in project che by eclipse.
the class PublishDiagnosticsParamsMessenger method onEvent.
public void onEvent(final PublishDiagnosticsParams event) {
try {
if (event instanceof PublishDiagnosticsParamsImpl && event.getUri().startsWith("file:///projects")) {
((PublishDiagnosticsParamsImpl) event).setUri(event.getUri().substring(16));
}
final ChannelBroadcastMessage bm = new ChannelBroadcastMessage();
bm.setChannel("languageserver/textDocument/publishDiagnostics");
bm.setBody(new Gson().toJson(event));
WSConnectionContext.sendMessage(bm);
} catch (EncodeException | IOException e) {
LOG.error(e.getMessage(), e);
}
}
Aggregations