-
Notifications
You must be signed in to change notification settings - Fork 24
/
view_helper_command.py
23 lines (21 loc) · 1.11 KB
/
view_helper_command.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import sublime, sublime_plugin
try:
from .debugger import *
except:
from debugger import *
class ViewHelperCommand(sublime_plugin.WindowCommand):
def __init__(self, window):
super(ViewHelperCommand, self).__init__(window)
def run(self, command, **args):
if command == "set_cursor":
sublime.set_timeout(lambda window=self.window, args=args: ViewHelper.set_cursor(window, **args), 0)
elif command == "get_current_cursor":
sublime.set_timeout(lambda window=self.window, args=args: ViewHelper.get_current_cursor(window, **args), 0)
elif command == "show_debug_windows":
sublime.set_timeout(lambda window=self.window, args=args: ViewHelper.init_debug_layout(window, **args), 0)
elif command == "hide_debug_windows":
sublime.set_timeout(lambda window=self.window, args=args: ViewHelper.hide_debug_windows(window, **args), 0)
elif command == "move_to_front":
sublime.set_timeout(lambda window=self.window, args=args: ViewHelper.move_to_front(window, **args), 0)
elif command == "sync_breakpoints":
sublime.set_timeout(lambda window=self.window, args=args: ViewHelper.sync_breakpoints(window, **args), 0)