code: def refresh_plugin(self):
          
          client = None
          if self.tabwidget.count():
              client = self.tabwidget.currentWidget()
  
              # Decide what to show for each client
              if client.info_page != client.blank_page:
                  # Show info_page if it has content
                  client.set_info_page()
                  client.shellwidget.hide()
                  client.layout.addWidget(self.infowidget)
                  self.infowidget.show()
              else:
                  self.infowidget.hide()
                  client.shellwidget.show()
  
              # Give focus to the control widget of the selected tab
              control = client.get_control()
              control.setFocus()
  
              # Create corner widgets
              buttons = [[b, -7] for b in client.get_toolbar_buttons()]
              buttons = sum(buttons, [])[:-1]
              widgets = [client.create_time_label()] + buttons
          else:
              control = None
              widgets = []
          self.find_widget.set_editor(control)
          self.tabwidget.set_corner_widgets({Qt.TopRightCorner: widgets})
          if client:
              sw = client.shellwidget
              self.main.variableexplorer.set_shellwidget_from_id(id(sw))
              self.main.plots.set_shellwidget_from_id(id(sw))
              self.main.help.set_shell(sw)
          self.update_tabs_text()
          self.sig_update_plugin_title.emit()
docs: Refresh tabwidget