MCPcopy Create free account
hub / github.com/chasingboy/Xtools / RecoverJsLinkCommand

Class RecoverJsLinkCommand

xtools.py:198–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196
197
198class RecoverJsLinkCommand(sublime_plugin.TextCommand):
199 def run(self, edit):
200 text = get_buffer_text(self.view)
201 prefix = get_console_text(self.view).strip('\n').strip('/') + '/'
202
203 try:
204 text = json.loads(text)
205 except:
206 sublime.message_dialog('[error] Json data has error! Please check...')
207 else:
208 rets = ''
209 for key in text.keys():
210 rets += prefix + key + '.' + text[key] + '.js\n'
211 panel_print(self.view, edit, rets)
212
213
214# Text Edit

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected