def on_api_ready(): global api_ready api_ready = True for m in list(sys.modules.values()): if "plugin_loaded" in m.__dict__: try: m.plugin_loaded() except: traceback.print_exc() # Synthesize an on_activated call w = sublime.active_window() if w: view_id = sublime_api.window_active_view(w.window_id) if view_id != 0: try: on_activated(view_id) except: traceback.print_exc() # Create ViewEventListener instances if len(view_event_listener_classes) > 0: for w in sublime.windows(): for v in w.views(): attach_view(v)
def on_api_ready(): global api_ready api_ready = True for plc in deferred_plugin_loadeds: try: plc() except: traceback.print_exc() deferred_plugin_loadeds.clear() # Create ViewEventListener instances if len(view_event_listener_classes) > 0: for w in sublime.windows(): for v in w.views(): attach_view(v) # Synthesize an on_activated call w = sublime.active_window() if w: view_id = sublime_api.window_active_view(w.window_id) if view_id != 0: try: on_activated(view_id) except: traceback.print_exc()
def attach(self, view, edit=None): window_id = sublime_api.view_window(view.view_id) if self.window_id != window_id: self.attach_window(sublime_api.view_window(view.view_id)) if view == self.output: view = sublime.View(sublime_api.window_active_view(window_id)) self.window = self.get_window() self.view = view self.edit = edit
def on_api_ready(): global api_ready api_ready = True for m in list(sys.modules.values()): if "plugin_loaded" in m.__dict__: m.plugin_loaded() # Synthesize an on_activated call w = sublime.active_window() if w: view_id = sublime_api.window_active_view(w.window_id) if view_id != 0: on_activated(view_id)
def on_api_ready(): global api_ready api_ready = True for m in list(sys.modules.values()): if "plugin_loaded" in m.__dict__: try: m.plugin_loaded() except: traceback.print_exc() # Synthesize an on_activated call w = sublime.active_window() if w: view_id = sublime_api.window_active_view(w.window_id) if view_id != 0: try: on_activated(view_id) except: traceback.print_exc()
def active_view(self): view_id = sublime_api.window_active_view(self.window_id) if view_id == 0: return None else: return View(view_id)
def force_active(): view_id = sublime_api.window_active_view(sublime_api.active_window()) sublime_plugin.on_load(view_id)
def force_active(): import sublime_api view_id = sublime_api.window_active_view(sublime_api.active_window()) sublime_plugin.on_activated(view_id)