Exemplo n.º 1
0
    def update(self):
        if ProcessCache.empty():
            return self.erase()

        status_bar_tasks = self.settings.get('status_bar_tasks', False)

        if status_bar_tasks:
            task_names = set([process.get_task_name() for process in ProcessCache.get()])

            if status_bar_tasks != True:
                if not isinstance(status_bar_tasks, list):
                    status_bar_tasks = [status_bar_tasks]

                task_names = task_names.intersection(set(status_bar_tasks))

            if task_names:
                defer_sync(lambda: self.set(', '.join(task_names)))
Exemplo n.º 2
0
 def run_process(self, task):
     process = CrossPlatformProcess(self.working_dir)
     process.run(task)
     stdout, stderr = process.communicate(self.append_to_output_view_in_main_thread)
     defer_sync(lambda: self.finish(stdout, stderr))
Exemplo n.º 3
0
 def show_quick_panel(self,
                      items,
                      on_done=None,
                      font=sublime.MONOSPACE_FONT):
     defer_sync(lambda: self.window.show_quick_panel(items, on_done, font))
Exemplo n.º 4
0
 def append_to_output_view_in_main_thread(self, text):
     defer_sync(lambda: self.append_to_output_view(text))
Exemplo n.º 5
0
 def show_quick_panel(self, items, on_done=None, font=sublime.MONOSPACE_FONT):
     defer_sync(lambda: self.window.show_quick_panel(items, on_done, font))
Exemplo n.º 6
0
 def append_to_output_view_in_main_thread(self, text):
     defer_sync(lambda: self.append_to_output_view(text))
Exemplo n.º 7
0
 def run_process(self, task):
     process = CrossPlatformProcess(self.working_dir)
     process.run(task)
     stdout, stderr = process.communicate(
         self.append_to_output_view_in_main_thread)
     defer_sync(lambda: self.finish(stdout, stderr))