Skip to content

Commit

Permalink
better name
Browse files Browse the repository at this point in the history
  • Loading branch information
rchl committed Oct 14, 2024
1 parent 013aaf0 commit b43942f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions plugin/core/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ def set_diagnostics_count(view: sublime.View, errors: int, warnings: int) -> Non
class GlobalLspListener(metaclass=ABCMeta):

@abstractmethod
def on_session_initialized_async(self, view_listener: AbstractViewListener, session: Session) -> None:
def on_session_view_initialized_async(self, view_listener: AbstractViewListener, session: Session) -> None:
raise NotImplementedError()

@abstractmethod
def on_session_shutdown_async(self, view_listener: AbstractViewListener, session: Session) -> None:
def on_session_view_shutdown_async(self, view_listener: AbstractViewListener, session: Session) -> None:
raise NotImplementedError()


Expand Down Expand Up @@ -220,7 +220,7 @@ def _publish_sessions_to_listener_async(self, listener: AbstractViewListener) ->
message = f"failed to register session {session.config.name} to listener {listener}"
exception_log(message, ex)
return
self._global_listener.on_session_initialized_async(listener, session)
self._global_listener.on_session_view_initialized_async(listener, session)

def sessions(self, view: sublime.View, capability: str | None = None) -> Generator[Session, None, None]:
inside_workspace = self._workspace.contains(view)
Expand Down Expand Up @@ -410,7 +410,7 @@ def on_post_exit_async(self, session: Session, exit_code: int, exception: Except
self._sessions.discard(session)
for listener in self._listeners:
listener.on_session_shutdown_async(session)
self._global_listener.on_session_shutdown_async(listener, session)
self._global_listener.on_session_view_shutdown_async(listener, session)
if exit_code != 0 or exception:
config = session.config
restart = self._config_manager.record_crash(config.name, exit_code, exception)
Expand Down Expand Up @@ -610,13 +610,13 @@ def on_userprefs_updated(self) -> None:

# --- Implements GlobalLspListener ---------------------------------------------------------------------------------

def on_session_initialized_async(self, view_listener: AbstractViewListener, session: Session) -> None:
def on_session_view_initialized_async(self, view_listener: AbstractViewListener, session: Session) -> None:
for listener in self._global_listeners:
listener.on_session_initialized_async(view_listener, session)
listener.on_session_view_initialized_async(view_listener, session)

def on_session_shutdown_async(self, view_listener: AbstractViewListener, session: Session) -> None:
def on_session_view_shutdown_async(self, view_listener: AbstractViewListener, session: Session) -> None:
for listener in self._global_listeners:
listener.on_session_shutdown_async(view_listener, session)
listener.on_session_view_shutdown_async(view_listener, session)


class RequestTimeTracker:
Expand Down

0 comments on commit b43942f

Please sign in to comment.