当前位置: 首页>>代码示例>>Python>>正文


Python ViewCollection.get_key方法代码示例

本文整理汇总了Python中GitGutter.view_collection.ViewCollection.get_key方法的典型用法代码示例。如果您正苦于以下问题:Python ViewCollection.get_key方法的具体用法?Python ViewCollection.get_key怎么用?Python ViewCollection.get_key使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GitGutter.view_collection.ViewCollection的用法示例。


在下文中一共展示了ViewCollection.get_key方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: run

# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import get_key [as 别名]
    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)
开发者ID:than,项目名称:GitGutter,代码行数:10,代码来源:git_gutter_compare.py

示例2: add

# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import get_key [as 别名]
 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
开发者ID:Mondego,项目名称:pyreco,代码行数:11,代码来源:allPythonContent.py

示例3: buf_tmp_file

# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import get_key [as 别名]
 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]
开发者ID:Mondego,项目名称:pyreco,代码行数:8,代码来源:allPythonContent.py

示例4: update_git_time

# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import get_key [as 别名]
 def update_git_time(view):
     key = ViewCollection.get_key(view)
     ViewCollection.git_times[key] = time.time()
开发者ID:Mondego,项目名称:pyreco,代码行数:5,代码来源:allPythonContent.py

示例5: clear_git_time

# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import get_key [as 别名]
 def clear_git_time(view):
     key = ViewCollection.get_key(view)
     ViewCollection.git_times[key] = 0
开发者ID:Mondego,项目名称:pyreco,代码行数:5,代码来源:allPythonContent.py

示例6: git_time

# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import get_key [as 别名]
 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]
开发者ID:Mondego,项目名称:pyreco,代码行数:7,代码来源:allPythonContent.py

示例7: total_lines

# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import get_key [as 别名]
 def total_lines(view):
     key = ViewCollection.get_key(view)
     return ViewCollection.views[key].total_lines()
开发者ID:Mondego,项目名称:pyreco,代码行数:5,代码来源:allPythonContent.py

示例8: ignored

# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import get_key [as 别名]
 def ignored(view):
     key = ViewCollection.get_key(view)
     return ViewCollection.views[key].ignored()
开发者ID:Mondego,项目名称:pyreco,代码行数:5,代码来源:allPythonContent.py

示例9: untracked

# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import get_key [as 别名]
 def untracked(view):
     key = ViewCollection.get_key(view)
     return ViewCollection.views[key].untracked()
开发者ID:Mondego,项目名称:pyreco,代码行数:5,代码来源:allPythonContent.py

示例10: diff

# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import get_key [as 别名]
 def diff(view):
     key = ViewCollection.get_key(view)
     return ViewCollection.views[key].diff()
开发者ID:Mondego,项目名称:pyreco,代码行数:5,代码来源:allPythonContent.py

示例11: get_handler

# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import get_key [as 别名]
 def get_handler(view):
     if ViewCollection.has_view(view):
         key = ViewCollection.get_key(view)
         return ViewCollection.views[key]
     else:
         return ViewCollection.add(view)
开发者ID:Mondego,项目名称:pyreco,代码行数:8,代码来源:allPythonContent.py

示例12: has_view

# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import get_key [as 别名]
 def has_view(view):
     key = ViewCollection.get_key(view)
     return key in ViewCollection.views
开发者ID:Mondego,项目名称:pyreco,代码行数:5,代码来源:allPythonContent.py

示例13: git_path

# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import get_key [as 别名]
 def git_path(view):
     key = ViewCollection.get_key(view)
     if key in ViewCollection.views:
         return ViewCollection.views[key].get_git_path()
     else:
         return False
开发者ID:Mondego,项目名称:pyreco,代码行数:8,代码来源:allPythonContent.py


注:本文中的GitGutter.view_collection.ViewCollection.get_key方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。