'Get plugin reference based on tab index.'

def _get_plugin(self, index):

    for plugin in self.main.widgetlist:
        tab_text = self.dock_tabbar.tabText(index).replace('&', '')
        if (plugin.get_plugin_title() == tab_text):
            return plugin
