def handle_diagnostics(update: 'Any'):
util.debug('handling diagnostics')
file_path = util.uri_to_filename(update.get('uri'))
window = sublime.active_window()
if not util.is_apex_file(window.active_view()):
util.debug("Skipping diagnostics for file", file_path,
" it is not in the workspace")
return
diagnostics = list(
Diagnostic.from_lsp(item) for item in update.get('diagnostics', []))
view = window.find_open_file(file_path)
# diagnostics = update.get('diagnostics')
update_diagnostics_in_view(view, diagnostics)
# update panel if available
origin = 'dxmate' # TODO: use actual client name to be able to update diagnostics per client
update_file_diagnostics(window, file_path, origin, diagnostics)
评论列表
文章目录