'Register plugin in Spyder\'s main window'

def register_plugin(self):

    self.main.add_dockwidget(self)
    self.help = self.main.help
    self.historylog = self.main.historylog
    self.variableexplorer = self.main.variableexplorer
    self.editor = self.main.editor
    self.explorer = self.main.explorer
    self.projects = self.main.projects
    self.focus_changed.connect(self.main.plugin_focus_changed)
    self.edit_goto.connect(self.editor.load)
    self.edit_goto[(str, int, str, bool)].connect((lambda fname, lineno, word, processevents: self.editor.load(fname, lineno, word, processevents=processevents)))
    self.editor.breakpoints_saved.connect(self.set_spyder_breakpoints)
    self.editor.run_in_current_ipyclient.connect(self.run_script)
    self.main.workingdirectory.set_current_console_wd.connect(self.set_current_client_working_directory)
    self.tabwidget.currentChanged.connect(self.update_working_directory)
