def run(self):
        self.view = self.window.active_view()
        key = ViewCollection.get_key(self.view)
        self.handler = ViewCollection.views[key]

        self.results = self.commit_list()
        if self.results:
            self.window.show_quick_panel(self.results, self.on_select)
Exemplo n.º 2
0
    def run(self):
        self.view = self.window.active_view()
        key = ViewCollection.get_key(self.view)
        self.handler = ViewCollection.views[key]

        self.results = self.commit_list()
        if self.results:
            self.window.show_quick_panel(self.results, self.on_select)
Exemplo n.º 3
0
 def add(view):
     key = ViewCollection.get_key(view)
     try:
         from GitGutter.git_gutter_handler import GitGutterHandler
     except ImportError:
         from git_gutter_handler import GitGutterHandler
     handler = ViewCollection.views[key] = GitGutterHandler(view)
     handler.reset()
     return handler
Exemplo n.º 4
0
 def add(view):
     key = ViewCollection.get_key(view)
     try:
         from GitGutter.git_gutter_handler import GitGutterHandler
     except ImportError:
         from git_gutter_handler import GitGutterHandler
     handler = ViewCollection.views[key] = GitGutterHandler(view)
     handler.reset()
     return handler
Exemplo n.º 5
0
 def git_path(view):
     key = ViewCollection.get_key(view)
     if key in ViewCollection.views:
         return ViewCollection.views[key].get_git_path()
     else:
         return False
Exemplo n.º 6
0
 def update_git_time(view):
     key = ViewCollection.get_key(view)
     ViewCollection.git_times[key] = time.time()
Exemplo n.º 7
0
 def git_time(view):
     key = ViewCollection.get_key(view)
     if not key in ViewCollection.git_times:
         ViewCollection.git_times[key] = 0
     return time.time() - ViewCollection.git_times[key]
Exemplo n.º 8
0
 def ignored(view):
     key = ViewCollection.get_key(view)
     return ViewCollection.views[key].ignored()
Exemplo n.º 9
0
 def diff(view):
     key = ViewCollection.get_key(view)
     return ViewCollection.views[key].diff()
Exemplo n.º 10
0
 def ignored(view):
     key = ViewCollection.get_key(view)
     return ViewCollection.views[key].ignored()
Exemplo n.º 11
0
 def untracked(view):
     key = ViewCollection.get_key(view)
     return ViewCollection.views[key].untracked()
Exemplo n.º 12
0
 def diff(view):
     key = ViewCollection.get_key(view)
     return ViewCollection.views[key].diff()
Exemplo n.º 13
0
 def get_handler(view):
     if ViewCollection.has_view(view):
         key = ViewCollection.get_key(view)
         return ViewCollection.views[key]
     else:
         return ViewCollection.add(view)
Exemplo n.º 14
0
 def has_view(view):
     key = ViewCollection.get_key(view)
     return key in ViewCollection.views
Exemplo n.º 15
0
 def git_path(view):
     key = ViewCollection.get_key(view)
     if key in ViewCollection.views:
         return ViewCollection.views[key].get_git_path()
     else:
         return False
Exemplo n.º 16
0
 def has_view(view):
     key = ViewCollection.get_key(view)
     return key in ViewCollection.views
Exemplo n.º 17
0
 def get_handler(view):
     if ViewCollection.has_view(view):
         key = ViewCollection.get_key(view)
         return ViewCollection.views[key]
     else:
         return ViewCollection.add(view)
Exemplo n.º 18
0
 def total_lines(view):
     key = ViewCollection.get_key(view)
     return ViewCollection.views[key].total_lines()
Exemplo n.º 19
0
 def untracked(view):
     key = ViewCollection.get_key(view)
     return ViewCollection.views[key].untracked()
Exemplo n.º 20
0
 def git_time(view):
     key = ViewCollection.get_key(view)
     if not key in ViewCollection.git_times:
         ViewCollection.git_times[key] = 0
     return time.time() - ViewCollection.git_times[key]
Exemplo n.º 21
0
 def total_lines(view):
     key = ViewCollection.get_key(view)
     return ViewCollection.views[key].total_lines()
Exemplo n.º 22
0
 def clear_git_time(view):
     key = ViewCollection.get_key(view)
     ViewCollection.git_times[key] = 0
Exemplo n.º 23
0
 def clear_git_time(view):
     key = ViewCollection.get_key(view)
     ViewCollection.git_times[key] = 0
Exemplo n.º 24
0
 def update_git_time(view):
     key = ViewCollection.get_key(view)
     ViewCollection.git_times[key] = time.time()
Exemplo n.º 25
0
 def buf_tmp_file(view):
     key = ViewCollection.get_key(view)
     if not key in ViewCollection.buf_files:
         ViewCollection.buf_files[key] = tempfile.NamedTemporaryFile()
         ViewCollection.buf_files[key].close()
     return ViewCollection.buf_files[key]
Exemplo n.º 26
0
 def buf_tmp_file(view):
     key = ViewCollection.get_key(view)
     if not key in ViewCollection.buf_files:
         ViewCollection.buf_files[key] = tempfile.NamedTemporaryFile()
         ViewCollection.buf_files[key].close()
     return ViewCollection.buf_files[key]