'Register plugin in Spyder\'s main window'

def register_plugin(self):

    self.findinfiles.get_pythonpath_callback = self.main.get_spyder_pythonpath
    self.main.add_dockwidget(self)
    self.findinfiles.result_browser.sig_edit_goto.connect(self.main.editor.load)
    self.findinfiles.find_options.redirect_stdio.connect(self.main.redirect_internalshell_stdio)
    self.main.workingdirectory.refresh_findinfiles.connect(self.refreshdir)
    self.main.projects.sig_project_loaded.connect(self.set_project_path)
    self.main.projects.sig_project_closed.connect(self.unset_project_path)
    self.main.editor.open_file_update.connect(self.set_current_opened_file)
    findinfiles_action = create_action(self, _('&Find    in    files'), icon=ima.icon('findf'), triggered=self.findinfiles_callback, tip=_('Search    text    in    multiple    files'))
    self.main.search_menu_actions += [MENU_SEPARATOR, findinfiles_action]
    self.main.search_toolbar_actions += [MENU_SEPARATOR, findinfiles_action]
    self.refreshdir()
