示例#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)))
示例#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))
示例#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))
示例#4
0
 def append_to_output_view_in_main_thread(self, text):
     defer_sync(lambda: self.append_to_output_view(text))
示例#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))
示例#6
0
 def append_to_output_view_in_main_thread(self, text):
     defer_sync(lambda: self.append_to_output_view(text))
示例#7
0
文件: gulp.py 项目: wufeishow/sublime
 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))