languageServer.py 文件源码

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

项目:DXMate 作者: jtowers 项目源码 文件源码
def start_server():
    deleteDbIfExists()
    working_dir = os.path.join(util.get_plugin_folder(), 'apex-jorje-lsp.jar')
    java_cmd = 'java'
    java_path = util.get_setting('java_path')
    util.debug(java_path)
    if java_path != '':
        java_cmd = os.path.join(java_path, java_cmd)

    util.debug('using java path: ', java_cmd)
    args = [java_cmd, '-cp', working_dir, '-Ddebug.internal.errors=true','-Ddebug.semantic.errors=false',
            'apex.jorje.lsp.ApexLanguageServerLauncher']
    util.debug("starting " + str(args))
    si = None
    if os.name == "nt":
        si = subprocess.STARTUPINFO()  # type: ignore
        si.dwFlags |= subprocess.SW_HIDE | subprocess.STARTF_USESHOWWINDOW  # type: ignore
    try:
        process = subprocess.Popen(
            args,
            stdin=subprocess.PIPE,
            stdout=subprocess.PIPE,
            stderr=subprocess.PIPE,
            cwd=util.dxProjectFolder(),
            startupinfo=si)
        return Client(process)

    except Exception as err:
        util.debug(err)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号