本文整理汇总了Python中view_collection.ViewCollection.add方法的典型用法代码示例。如果您正苦于以下问题:Python ViewCollection.add方法的具体用法?Python ViewCollection.add怎么用?Python ViewCollection.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类view_collection.ViewCollection
的用法示例。
在下文中一共展示了ViewCollection.add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: on_select
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def on_select(self, selected):
if 0 > selected < len(self.results):
return
item = self.results[selected]
commit = self.item_to_commit(item)
ViewCollection.set_compare(commit)
ViewCollection.clear_git_time(self.view)
ViewCollection.add(self.view)
示例2: on_modified
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def on_modified(self, view):
if view.settings().get('git_gutter_live_mode', True):
# Sublime Text is very strict on the amount of time plugin
# uses in performance-critical events. Sometimes invoking plugin
# from this event causes Sublime warning to appear, so we need to
# schedule its run for future.
sublime.set_timeout(lambda: ViewCollection.add(view), 1)
示例3: on_modified
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def on_modified(self, view):
if view.settings().get('git_gutter_live_mode', True):
ViewCollection.add(view)
示例4: on_load
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def on_load(self, view):
ViewCollection.add(view)
示例5: on_post_save
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def on_post_save(self, view):
ViewCollection.add(view)
示例6: on_clone
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def on_clone(self, view):
ViewCollection.add(view)
示例7: on_clone
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def on_clone(self, view):
if not _non_blocking:
ViewCollection.add(view)
示例8: on_load
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def on_load(self, view):
if self.settings_loaded():
if not self.non_blocking and not self.live_mode:
ViewCollection.add(view)
示例9: on_modified
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def on_modified(self, view):
if not _live_mode:
return None
ViewCollection.add(view)
示例10: on_load_async
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def on_load_async(self, view):
if _non_blocking and not _live_mode:
ViewCollection.add(view)
示例11: on_activated_async
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def on_activated_async(self, view):
if not _live_mode:
return None
if _non_blocking:
ViewCollection.add(view)
示例12: on_post_save_async
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def on_post_save_async(self, view):
if _non_blocking:
ViewCollection.add(view)
示例13: on_clone_async
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def on_clone_async(self, view):
if _non_blocking:
ViewCollection.add(view)
示例14: on_post_save
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def on_post_save(self, view):
if not _non_blocking:
ViewCollection.add(view)
示例15: run
# 需要导入模块: from view_collection import ViewCollection [as 别名]
# 或者: from view_collection.ViewCollection import add [as 别名]
def run(self):
self.view = self.window.active_view()
ViewCollection.set_compare("HEAD")
ViewCollection.clear_git_time(self.view)
ViewCollection.add(self.view)