def destroy_output_panels(window: sublime.Window) -> None: for field in filter(lambda a: not a.startswith('__'), PanelName.__dict__.keys()): panel_name = getattr(PanelName, field) panel = window.find_output_panel(panel_name) if panel and panel.is_valid(): panel.settings().set("syntax", "Packages/Text/Plain text.tmLanguage") window.destroy_output_panel(panel_name)
def create( cls, window: sublime.Window, name: str, *, force_writes: bool = False, follow_cursor: bool = False, unlisted: bool = False, **kwargs: Any ) -> 'OutputPanel': """Create a new output panel with the given `name` in the given `window`. If `kwargs` are given, they will be interpreted as for :func:`~sublime_lib.view_utils.new_view`. """ validate_view_options(kwargs) window.destroy_output_panel(name) view = window.create_output_panel(name, unlisted) set_view_options(view, **kwargs) return cls(window, name, force_writes=force_writes, follow_cursor=follow_cursor)
def destroy_output_panels(window: sublime.Window) -> None: for panel_name in ["references", "diagnostics"]: window.destroy_output_panel(panel_name)
def hide_error_result(window: sublime.Window) -> None: """hide error panel""" window.destroy_output_panel(ERROR_RESPONSE_PANEL_NAME)