docs: def open_file(self, path):
          """
          Creates a new GenericCodeEdit, opens the requested file and adds it
          to the tab widget.
  
          :param path: Path of the file to open
          """
          if path:
              editor = self.tabWidget.open_document(path)
              editor.cursorPositionChanged.connect(
                  self.on_cursor_pos_changed)
              self.recent_files_manager.open_file(path)
              self.menu_recents.update_actions()