code: def add_to_fileswitcher(self, plugin, tabs, data, icon):
          
          if self.fileswitcher is None:
              from spyder.widgets.fileswitcher import FileSwitcher
              self.fileswitcher = FileSwitcher(self, plugin, tabs, data, icon)
          else:
              self.fileswitcher.add_plugin(plugin, tabs, data, icon)
  
          self.fileswitcher.sig_goto_file.connect(
                  plugin.get_current_tab_manager().set_stack_index)
docs: Add a plugin to the File Switcher.