def on_install_done(c): s = output_str(c) x = c.exception() if x: tpl = 'Error while installing dependencies\nCommand: %s\nException: %s\nOutput: %s' gs.show_output(DOMAIN, tpl % (c.cmd, x, s), merge_domain=True) js, _, _ = gsshell.run(cmd=BUNDLE_GOSUBLIME9, shell=True) js = json.loads(js) for k,v in js.iteritems(): if v: gs.environ9[k] = v print_install_log(c, s) c = gsshell.Command(cmd=[ BUNDLE_MARGO, "-d", "-call", "replace", "-addr", gs.setting('margo_addr', '') ]) c.on_done = on_margo_done c.start() gsshell.run(cmd=[BUNDLE_GOCODE, 'close'])
def cb(): aso = gs.aso() old_rev = aso.get('changelog.rev', '') new_rev = changes[0][0] if new_rev > old_rev: aso.set('changelog.rev', new_rev) gs.save_aso() new_changes = [ 'GoSublime: Recent Updates (you may need to restart Sublime Text for changes to take effect)', '------------------------------------------------------------------------------------------', ] for change in changes: rev, msg = change if rev > old_rev: new_changes.append('\n%s\n\t%s' % (rev, msg)) else: break new_changes.append('\nSee %s for the full CHANGELOG\n' % changelog_fn) new_changes = '\n'.join(new_changes) gs.show_output(DOMAIN, new_changes, print_output=False)
def on_install_done(c): s = output_str(c) x = c.exception() if x: tpl = 'Error while installing dependencies\nCommand: %s\nException: %s\nOutput: %s' gs.show_output(DOMAIN, tpl % (c.cmd, x, s), merge_domain=True) js, _, _ = gsshell.run(cmd=BUNDLE_GOSUBLIME9, shell=True) js = json.loads(js) for k, v in js.iteritems(): if v: gs.environ9[k] = v print_install_log(c, s) c = gsshell.Command(cmd=[ BUNDLE_MARGO, "-d", "-call", "replace", "-addr", gs.setting('margo_addr', '') ]) c.on_done = on_margo_done c.start() gsshell.run(cmd=[BUNDLE_GOCODE, 'close'])
def show_hint(self, s): dmn = '%s.completion-hint' % DOMAIN gs.show_output(dmn, s, print_output=False, syntax_file='GsDoc')
def show_output(self, s): gs.show_output(DOMAIN+'-output', s, False, 'Packages/Go/Go.tmLanguage')
def run(self): s = 'GoSublime Sanity Check\n\n%s' % '\n'.join(['%7s: %s' % ln for ln in _sanity_check()]) gs.show_output(DOMAIN, s, print_output=False)
def show_output(self, s): gs.show_output(DOMAIN+'-output', s, False, 'GsDoc')
def show_output(self, s): gs.show_output(DOMAIN + "-output", s, False, "GsDoc")
def show_hint(self, s): dmn = "%s.completion-hint" % DOMAIN gs.show_output(dmn, s, print_output=False, syntax_file="GsDoc")
def run(self): s = 'GoSublime Sanity Check\n\n%s' % '\n'.join( ['%7s: %s' % ln for ln in _sanity_check()]) gs.show_output(DOMAIN, s, print_output=False)
def run(self): s = "GoSublime Sanity Check\n\n%s" % "\n".join(["%7s: %s" % ln for ln in _sanity_check()]) gs.show_output(DOMAIN, s, print_output=False)