def run(self, edit):
settings = sublime.load_settings(lt_settings_file)
jarPath = settings.get('languagetool_jar')
if jarPath:
if os.path.isfile(jarPath):
sublime.status_message('Starting local LanguageTool server ...')
cmd = ['java', '-jar', jarPath, '-t']
if sublime.platform() == "windows":
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True, creationflags=subprocess.SW_HIDE)
else:
p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else:
showPanelText('Error, could not find LanguageTool\'s JAR file (%s)\n\nPlease install LT in this directory or modify the `languagetool_jar` setting.' % jarPath)
评论列表
文章目录