diagnostic.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:DXMate 作者: jtowers 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号