def create_tab_with_current_kernel(self):
current_widget = self.tab_widget.currentWidget()<EOL>current_widget_index = self.tab_widget.indexOf(current_widget)<EOL>current_widget_name = self.tab_widget.tabText(current_widget_index)<EOL>widget = self.slave_frontend_factory(current_widget)<EOL>if '<STR_LIT>' in current_widget_name:<EOL><INDENT>name = current_widget_name<EOL><DEDENT>else:<EOL><INDENT>name = '<STR_LIT>' % current_widget_name<EOL><DEDENT>self.add_tab_with_frontend(widget,name=name)<EOL>
create a new frontend attached to the same kernel as the current tab