<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_to_fileswitcher(self, plugin, tabs, data, icon):

 """Add a plugin to the File Switcher."""

        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)