예제 #1
0
    def apply(self, window=None):
        if window is None:
            window = sublime.active_window()
        self._window = window

        self.save_original_layout(window)
        window.set_layout(self.get_setting('layout'))
        for v in window.views():
            util.move_to_group(window, v, 0)
예제 #2
0
    def apply(self, window=None):
        if window is None:
            window = sublime.active_window()
        self._window = window

        self.save_original_layout(window)
        window.set_layout(self.get_setting('layout'))
        for v in window.views():
            util.move_to_group(window, v, 0)
예제 #3
0
 def load_original_layout(self, window):
     window.set_layout(self._original_layout)
     current_views = dict([(v.id(), v) for v in window.views()])
     for i, view_ids in enumerate(self._original_views):
         for vid in view_ids:
             if vid in current_views:
                 util.move_to_group(window, current_views[vid], i)
     window.focus_group(self._original_group)
     if self._original_active in current_views:
         window.focus_view(current_views[self._original_active])
예제 #4
0
 def load_original_layout(self, window):
     window.set_layout(self._original_layout)
     current_views = dict([(v.id(), v) for v in window.views()])
     for i, view_ids in enumerate(self._original_views):
         for vid in view_ids:
             if vid in current_views:
                 util.move_to_group(window, current_views[vid], i)
     window.focus_group(self._original_group)
     if self._original_active in current_views:
         window.focus_view(current_views[self._original_active])
예제 #5
0
    def __init__(self, name, interactive=False, group=None, window=None):
        self.interactive = interactive

        if window is None:
            window = sublime.active_window()
        self.window = window

        view = DebugWindow.find_by_name(name)
        if view is None:
            view = window.new_file()

        view.set_scratch(True)
        view.set_name(name)
        self.view = view
        view.settings().set('debugwindow', True)
        view.settings().set('gutter', False)
        view.settings().set('auto_indent', False)

        if group is not None:
            util.move_to_group(window, self.view, group)
예제 #6
0
    def __init__(self, name, interactive=False, group=None, window=None):
        self.interactive = interactive

        if window is None:
            window = sublime.active_window()
        self.window = window

        view = DebugWindow.find_by_name(name)
        if view is None:
            view = window.new_file()

        view.set_scratch(True)
        view.set_name(name)
        self.view = view
        view.settings().set('debugwindow', True)
        view.settings().set('gutter', False)
        view.settings().set('auto_indent', False)

        if group is not None:
            util.move_to_group(window, self.view, group)