'Add a plugin to the File Switcher.'

def add_to_fileswitcher(self, plugin, tabs, data, icon):

    if (self.fileswitcher is None):
        self.fileswitcher = FileSwitcher(self, plugin, tabs, data, icon)
        self.fileswitcher.sig_goto_file.connect(plugin.get_current_tab_manager().set_stack_index)
    else:
        self.fileswitcher.add_plugin(plugin, tabs, data, icon)
        self.fileswitcher.sig_goto_file.connect(plugin.get_current_tab_manager().set_stack_index)
