def tab_switched_cb(self, tab_w, widget):
        # A tab in a workspace in which we started a plugin has been
        # raised.  Check for this widget and focus the plugin
        title = widget.extdata.get('tab_title', None)
        if title is not None:
            # is this a local plugin tab?
            if ':' in title:
                chname, plname = title.split(':')
                plname = plname.strip()
                try:
                    info = self.get_info(plname)
                except __HOLE__:
                    # no
                    return
                pInfo = info.pInfo
                # important: make sure channel matches ours!
                if pInfo.tabname == title:
                    if self.is_active(pInfo.name):
                        if not self.has_focus(pInfo.name):
                            self.set_focus(pInfo.name)
                        elif pInfo.chinfo is not None:
                            # raise the channel associated with the plugin
                            itab = pInfo.chinfo.name
                            self.ds.raise_tab(itab)
dataset/ETHPy150Open ejeschke/ginga/ginga/gw/PluginManager.py/PluginManager.tab_switched_cb