Registers the inputed walkthrough to the system.
        
        :param      walkthrough | <XWalkthrough>
196921
def registerWalkthrough(self, walkthrough):
        
        if not walkthrough in self._walkthroughs:
            self._walkthroughs.append(walkthrough)
47218
def register( cls, plugin ):
        
        if ( not plugin ):
            return
            
        if ( cls._plugins is None ):
            cls._plugins = {}
            
        cls._plugins[plugin.uniqueName()] = plugin
749501
def register_view(self, view):
        """"""
        super(AbstractTreeViewController, self).register_view(view)
        self.signal_handlers.append((self._tree_selection,
                                     self._tree_selection.connect('changed', self.selection_changed)))
        # self.handler_ids.append((self.tree_view,
        #                          self.tree_view.connect('key-press-event', self.tree_view_keypress_callback)))
        self.tree_view.connect('key-release-event', self.on_key_release_event)
        self.tree_view.connect('button-release-event', self.tree_view_keypress_callback)
        # key press is needed for tab motion but needs to be registered already here TODO why?
        self.tree_view.connect('key-press-event', self.tree_view_keypress_callback)
        self._tree_selection.set_mode(Gtk.SelectionMode.MULTIPLE)
        self.update_selection_sm_prior()
1026878
def load_entry_point_actions(self, entry_point_group):
        
        for ep in pkg_resources.iter_entry_points(group=entry_point_group):
            self.register_action(ep.load())
175704
def add_to_following(self, following):
        
        assert isinstance(following, github.NamedUser.NamedUser), following
        headers, data = self._requester.requestJsonAndCheck(
            "PUT",
            "/user/following/" + following._identity
        )
1265938
def register(cls, encryptor: Encryptor):
        
        # save the current encryptor statically
        cls.__encryptor__ = encryptor

        # NB: we cannot use the before_insert listener in conjunction with a foreign key relationship
        # for encrypted data; SQLAlchemy will warn about using 'related attribute set' operation so
        # late in its insert/flush process.
        listeners = dict(
            init=on_init,
            load=on_load,
        )

        for name, func in listeners.items():
            # If we initialize the graph multiple times (as in many unit testing scenarios),
            # we will accumulate listener functions -- with unpredictable results. As protection,
            # we need to remove existing listeners before adding new ones; this solution only
            # works if the id (e.g. memory address) of the listener does not change, which means
            # they cannot be closures around the `encryptor` reference.
            #
            # Hence the `__encryptor__` hack above...
            if contains(cls, name, func):
                remove(cls, name, func)
            listen(cls, name, func)
227620
def register(listener):
    
    if not isinstance(listener, _EventListener):
        raise TypeError("Listeners for %s must be either a "
                        "CommandListener, ServerHeartbeatListener, "
                        "ServerListener, or TopologyListener." % (listener,))
    if isinstance(listener, CommandListener):
        _LISTENERS.command_listeners.append(listener)
    if isinstance(listener, ServerHeartbeatListener):
        _LISTENERS.server_heartbeat_listeners.append(listener)
    if isinstance(listener, ServerListener):
        _LISTENERS.server_listeners.append(listener)
    if isinstance(listener, TopologyListener):
        _LISTENERS.topology_listeners.append(listener)
949824
def register(cls, parser, name=None):
        
        help_title, help_body = utils.parse_docstring(cls)
        command_parser = parser.subparsers.add_parser(
            cls.name() if name is None else name, help=help_title,
            description=help_title, epilog=help_body, add_help=False,
            formatter_class=HelpFormatter)
        command_parser.add_argument(
            "-h", "--help", action=PagedHelpAction, help=argparse.SUPPRESS)
        command_parser.set_defaults(execute=cls(command_parser))
        return command_parser
195593
def register(self, plugin):
        
        if plugin.name not in self._registered:
            logger.info('Registering plugin %s' % plugin.name)
            self._registered[plugin.name] = plugin
        else:
            logger.warn('Plugin %s already registered' % plugin.name)
90290
def register_commands(self):
        
        for command in self._entry_points[self.COMMANDS_ENTRY_POINT].values():
            command.load()
330595
def showEvent(self, event):
        
        super(XWalkthroughWidget, self).showEvent(event)
        
        self.autoLayout()
        self.restart()
        self.setFocus()
        self.raise_()
511064
def register(self, prefix, viewset, base_name=None, router_class=None):
        
        if base_name is None:
            base_name = self.get_default_base_name(viewset)

        if router_class is not None:
            kwargs = {'trailing_slash': bool(self.trailing_slash)}
            single_object_router_classes = (
                AuthenticationRouter, SingleObjectRouter)

            if issubclass(router_class, single_object_router_classes):
                router = router_class(**kwargs)
                router.register(prefix, viewset, base_name=base_name)
                self._single_object_registry.append(router)

        else:
            self.registry.append((prefix, viewset, base_name))
162122
def walkerWrapper(callback):
        
        def wrapper(*args,**kwargs):
            #args[0] => has to be the current walked section
            return Section.sectionWalker(args[0],callback,*args[1:],**kwargs)
        return wrapper
783556
def register(self):
        
        if not self.registered:
            self.registered = True
            if self.parent:
                self.parent.register(self)
5337
def register_view(self, view):
        
        super(StateOutcomesEditorController, self).register_view(view)
        if isinstance(view, StateOutcomesEditorView):
            self.connect_signal(view['add_button'], "clicked", self.oc_list_ctrl.on_add)
            self.connect_signal(view['remove_button'], "clicked", self.oc_list_ctrl.on_remove)

            if isinstance(self.model.state, LibraryState) or self.model.state.get_next_upper_library_root_state():
                view['add_button'].set_sensitive(False)
                view['remove_button'].set_sensitive(False)
259994
def register_command_runner(arg):
    
    if isinstance(arg, str):
        def inner(command_runner):
            command_runners.setdefault(arg, [])
            command_runners[arg].append(command_runner)
            return command_runner
        return inner
    elif issubclass(arg, CommandRunner):
        command_runners.setdefault('', [])
        command_runners[''].append(arg)
        return arg
    else:
        msg = 'register_command_runner expects str or CommandRunner as argument, got: {0}'.\
            format(arg)
        raise ValueError(msg)
310464
def register_plugin(self):
        """"""
        ipyconsole = self.main.ipyconsole
        treewidget = self.explorer.treewidget
        lspmgr = self.main.lspmanager

        self.main.add_dockwidget(self)
        self.explorer.sig_open_file.connect(self.main.open_file)
        self.register_widget_shortcuts(treewidget)

        treewidget.sig_delete_project.connect(self.delete_project)
        treewidget.sig_edit.connect(self.main.editor.load)
        treewidget.sig_removed.connect(self.main.editor.removed)
        treewidget.sig_removed_tree.connect(self.main.editor.removed_tree)
        treewidget.sig_renamed.connect(self.main.editor.renamed)
        treewidget.sig_renamed_tree.connect(self.main.editor.renamed_tree)
        treewidget.sig_create_module.connect(self.main.editor.new)
        treewidget.sig_new_file.connect(
            lambda t: self.main.editor.new(text=t))
        treewidget.sig_open_interpreter.connect(
            ipyconsole.create_client_from_path)
        treewidget.redirect_stdio.connect(
            self.main.redirect_internalshell_stdio)
        treewidget.sig_run.connect(
            lambda fname:
            ipyconsole.run_script(fname, osp.dirname(fname), '', False, False,
                                  False, True))

        # New project connections. Order matters!
        self.sig_project_loaded.connect(
            lambda v: self.main.workingdirectory.chdir(v))
        self.sig_project_loaded.connect(
            lambda v: self.main.set_window_title())
        self.sig_project_loaded.connect(lspmgr.reinitialize_all_clients)
        self.sig_project_loaded.connect(
            lambda v: self.main.editor.setup_open_files())
        self.sig_project_loaded.connect(self.update_explorer)
        self.sig_project_closed[object].connect(
            lambda v: self.main.workingdirectory.chdir(
                self.get_last_working_dir()))
        self.sig_project_closed.connect(
            lambda v: self.main.set_window_title())
        self.sig_project_closed.connect(lspmgr.reinitialize_all_clients)
        self.sig_project_closed.connect(
            lambda v: self.main.editor.setup_open_files())
        self.recent_project_menu.aboutToShow.connect(self.setup_menu_actions)

        self.main.pythonpath_changed()
        self.main.restore_scrollbar_position.connect(
                                               self.restore_scrollbar_position)
        self.sig_pythonpath_changed.connect(self.main.pythonpath_changed)
        self.main.editor.set_projects(self)