Register callback methods fot triggered actions.

        :param rafcon.gui.shortcut_manager.ShortcutManager shortcut_manager: Shortcut Manager Object holding mappings
            between shortcuts and actions.
351685
def register_actions(self, shortcut_manager):
        
        shortcut_manager.add_callback_for_action('close', self.on_close_shortcut)

        # Call register_action of parent in order to register actions for child controllers
        super(StateMachinesEditorController, self).register_actions(shortcut_manager)
865000
def register(self, event, callback):
        
        pattern = self.channels.event_pattern(event)
        entry = self.callbacks.get(pattern)
        if not entry:
            entry = event_callbacks(event, pattern, re.compile(pattern), [])
            self.callbacks[entry.pattern] = entry

        if callback not in entry.callbacks:
            entry.callbacks.append(callback)

        return entry
1287236
def register(self, observer):
        
        self.observer_manager.append(observer)
        observer.manager = self
1110613
def trigger(self):
        
        self.call_back(*self.args, **self.kwargs)
        if self.__timer is not None:
            self.__timer.cancel()
760809
def add_actions
      # Checks whether the event can be fired on the current object
      machine.define_helper(:instance, "can_#{qualified_name}?") do |machine, object, *args|
        machine.event(name).can_fire?(object, *args)
      end

      # Gets the next transition that would be performed if the event were
      # fired now
      machine.define_helper(:instance, "#{qualified_name}_transition") do |machine, object, *args|
        machine.event(name).transition_for(object, *args)
      end

      # Fires the event
      machine.define_helper(:instance, qualified_name) do |machine, object, *args|
        machine.event(name).fire(object, *args)
      end

      # Fires the event, raising an exception if it fails
      machine.define_helper(:instance, "#{qualified_name}!") do |machine, object, *args|
        object.send(qualified_name, *args) || raise(StateMachines::InvalidTransition.new(object, machine, name))
      end
    end
1120475
def handleActionTrigger(self, action):
        
        # trigger a particular profile
        if isinstance(action, XViewProfileAction):
            # if the user CTRL+Clicks on the action, then attempt
            # to load it in a new window
            if QApplication.keyboardModifiers() == Qt.ControlModifier:
                self.newWindowProfileRequested.emit(action.profile())
                self.setCurrentProfile(self.currentProfile())
                return
            else:
                self.setCurrentProfile(action.profile())
1223428
def menu_callback(self, m):
        ''''''
        if m.returnkey.startswith('# '):
            cmd = m.returnkey[2:]
            if m.handler is not None:
                if m.handler_result is None:
                    return
                cmd += m.handler_result
            self.mpstate.functions.process_stdin(cmd)
        if m.returnkey == 'menuSettings':
            wxsettings.WXSettings(self.settings)
1062160
def register_handlers(self, handler_classes):
        
        for handler_class in handler_classes:
            self.handlers.append(handler_class(client=self.client))
            logging.info('Successfully registered {handler_class}'.format(
                handler_class=getattr(handler_class, '__name__', str(handler_class)))
            )
822054
def register_actions(self, shortcut_manager):
        
        shortcut_manager.add_callback_for_action("add", partial(self._add_new_state, state_type=StateType.EXECUTION))
        shortcut_manager.add_callback_for_action("add_execution_state", partial(self._add_new_state,
                                                                                state_type=StateType.EXECUTION))
        shortcut_manager.add_callback_for_action("add_hierarchy_state", partial(self._add_new_state,
                                                                                state_type=StateType.HIERARCHY))
        shortcut_manager.add_callback_for_action("add_barrier_state", partial(self._add_new_state,
                                                                              state_type=StateType.BARRIER_CONCURRENCY))
        shortcut_manager.add_callback_for_action("add_preemptive_state", partial(self._add_new_state,
                                                                                 state_type=StateType.PREEMPTION_CONCURRENCY))

        shortcut_manager.add_callback_for_action("add_output", partial(self._add_data_port_to_selected_state,
                                                                       data_port_type='OUTPUT'))
        shortcut_manager.add_callback_for_action("add_input", partial(self._add_data_port_to_selected_state,
                                                                      data_port_type='INPUT'))
        shortcut_manager.add_callback_for_action("add_scoped_variable", self._add_scoped_variable_to_selected_state)
        shortcut_manager.add_callback_for_action("add_outcome", self._add_outcome_to_selected_state)

        shortcut_manager.add_callback_for_action("delete", self._remove_selected_elements)

        shortcut_manager.add_callback_for_action("copy", self._copy_selection)
        shortcut_manager.add_callback_for_action("paste", self._paste_clipboard)
        shortcut_manager.add_callback_for_action("cut", self._cut_selection)

        shortcut_manager.add_callback_for_action('show_data_flows', self.update_view)
        shortcut_manager.add_callback_for_action('show_data_values', self.update_view)
        shortcut_manager.add_callback_for_action('data_flow_mode', self.data_flow_mode)
        shortcut_manager.add_callback_for_action('show_aborted_preempted', self.update_view)
1003853
def register_action(*args, **kwarg):
    '''
    
    '''
    def decorator(fun):
        KeywordArgumentParser._action_dict[frozenset(args)] = fun
        return fun
    return decorator
495474
def register_handler(self, handler):
        
        self._handlers[handler.namespace] = handler

        handler.registered(self)
130188
def register_custom_actions(parser: argparse.ArgumentParser) -> None:
    """"""
    parser.register('action', None, _StoreRangeAction)
    parser.register('action', 'store', _StoreRangeAction)
    parser.register('action', 'append', _AppendRangeAction)
832852
private void addActivationHandler() {

        if (m_activationHandlerRegistration == null) {
            m_activationHandlerRegistration = addMouseDownHandler(new MouseDownHandler() {

                public void onMouseDown(MouseDownEvent event) {

                    // only act on click if not inside the button bar
                    if (!m_buttonBar.getElement().isOrHasChild((Node)event.getNativeEvent().getEventTarget().cast())) {
                        activateWidget();
                    }
                }
            });
        }
    }
1305971
def register(self, method, uri, call_back):
        
        found = False

        self.create_route(uri, False)
        self.routes[uri]['handlers'].register_method(method,
                                                     call_back)
775718
def add_keydown(self, actions, **kwargs):
        
        return self.add_handler(pygame.KEYDOWN, actions, **kwargs)
381891
def register_widget_shortcuts(self, widget):
        
        for qshortcut, context, name in widget.get_shortcut_data():
            self.register_shortcut(qshortcut, context, name)
489619
def _get_handled_methods(self, actions_map):
        
        methods = ('OPTIONS',)

        defined_actions = []
        for action_name in actions_map.keys():
            view_method = getattr(self, action_name, None)
            method_exists = view_method is not None
            method_defined = view_method != self.not_allowed_action
            if method_exists and method_defined:
                defined_actions.append(action_name)

        for action in defined_actions:
            methods += actions_map[action]

        return methods