Add "split" action link.
346065
public function Base_BeforeCheckComments_Handler($Sender) {
      $ActionMessage = &$Sender->EventArguments['ActionMessage'];
      $Discussion = $Sender->EventArguments['Discussion'];
      if (Gdn::Session()->CheckPermission('Vanilla.Discussions.Edit', TRUE, 'Category', $Discussion->PermissionCategoryID))
         $ActionMessage .= ' '.Anchor(T('Split'), 'vanilla/moderation/splitcomments/'.$Discussion->DiscussionID.'/', 'Split Popup');
   }
765447
protected static void splitAndSetParams(String urlParam) {
		String[] urlParams = StrUtil.split(urlParam, HuluSetting.urlParamSeparator);
		urlParamsLocal.set(urlParams);
	}
191323
def split(self, t):
        """"""
        pt = self.point(t)
        return Line(self.start, pt), Line(pt, self.end)
789764
function addActionBtn( id, res ) {
  log( 'addActionBtn', "start");
  var html = "";
  for( var x = 0; x < res.actions.length; x++ ) {
    var action = res.actions[x];
    var name = "help";
    var txt = "?";
    var icon = "ui-iocon-help";
    var jscall = "help";
    if ( action.actionName == "fullWidth" ) {
      name = "fullWidth";
      txt = "Full width";
      icon = "ui-icon-arrow-2-e-w";
      jscall = "resViewFullWidth( \""+id+"\" );";
      html += "<button id=\""+id+name+"Bt\">"+ $.i18n( txt )+"</button>";
      html += "<script>  $(function() { $( \"#"+id+name+"Bt\" ).button( { icons:{primary: \""+icon+"\"}, text: false } ).click( "+
        "function() { "+jscall+" }); }); </script>";    

    } else if ( action.actionName == "fullScreen" ) {
      name = "fullScreen";
      txt = "Full screen";
      icon = "ui-icon-arrow-4-diag";
      jscall = "resViewFullScreen( \""+id+"\" );";
      html += "<button id=\""+id+name+"Bt\">"+ $.i18n( txt )+"</button>";
      html += "<script>  $(function() { $( \"#"+id+name+"Bt\" ).button( { icons:{primary: \""+icon+"\"}, text: false } ).click( "+
        "function() { "+jscall+" }); }); </script>";    
    } 

    // hook for generating action button code
    log( 'addActionBtn', "addActionBtn "+action.type );
    hook = getHookMethod( "addActionBtn", action.type );
    if ( hook != "" ) {
      log( 'addActionBtn', hook+"( "+action.actionName+" )");
      html += eval( hook+"( id, action.actionName, res.resourceURL, action.param )" );
      dlgMap.push( [ id, action.actionName, res.resourceURL, action.type, action.param ] );
    }
  }
  return html;
}
554679
def _create_multi_buffer_action(self):
        """"""
        icon = resources_path('img', 'icons', 'show-multi-buffer.svg')
        self.action_multi_buffer = QAction(
            QIcon(icon),
            self.tr('Multi Buffer'), self.iface.mainWindow())
        self.action_multi_buffer.setStatusTip(self.tr(
            'Open InaSAFE multi buffer'))
        self.action_multi_buffer.setWhatsThis(self.tr(
            'Open InaSAFE multi buffer'))
        self.action_multi_buffer.triggered.connect(self.show_multi_buffer)
        self.add_action(
            self.action_multi_buffer,
            add_to_toolbar=self.full_toolbar)
312609
def splitkeyurl(url):
    '''
       
    '''
    key = url[-22:]
    urlid = url[-34:-24]
    service = url[:-43]
    return service, urlid, key
228842
def split_input(args):
    """"""
    args['files'] = []
    args['urls'] = []
    for arg in args['query']:
        if os.path.isfile(arg):
            args['files'].append(arg)
        else:
            args['urls'].append(arg.strip('/'))
1016801
function add_plugin_action_link( $label, $url, $external = false, $priority = WP_FS__DEFAULT_PRIORITY, $key = false ) {
            $this->_logger->entrance();

            if ( ! isset( $this->_action_links[ $priority ] ) ) {
                $this->_action_links[ $priority ] = array();
            }

            if ( false === $key ) {
                $key = preg_replace( "/[^A-Za-z0-9 ]/", '', strtolower( $label ) );
            }

            $this->_action_links[ $priority ][] = array(
                'label'    => $label,
                'href'     => $url,
                'key'      => $key,
                'external' => $external
            );
        }
1096623
def add_actions(target, actions, insert_before=None):
    """"""
    previous_action = None
    target_actions = list(target.actions())
    if target_actions:
        previous_action = target_actions[-1]
        if previous_action.isSeparator():
            previous_action = None
    for action in actions:
        if (action is None) and (previous_action is not None):
            if insert_before is None:
                target.addSeparator()
            else:
                target.insertSeparator(insert_before)
        elif isinstance(action, QMenu):
            if insert_before is None:
                target.addMenu(action)
            else:
                target.insertMenu(insert_before, action)
        elif isinstance(action, QAction):
            if isinstance(action, SpyderAction):
                if isinstance(target, QMenu) or not isinstance(target, QToolBar):
                    try:
                        action = action.no_icon_action
                    except RuntimeError:
                        continue
            if insert_before is None:
                # This is needed in order to ignore adding an action whose
                # wrapped C/C++ object has been deleted. See issue 5074
                try:
                    target.addAction(action)
                except RuntimeError:
                    continue
            else:
                target.insertAction(insert_before, action)
        previous_action = action
279958
def expand(self, url):
        """"""
        url = self.clean_url(url)
        response = self._get(url)
        if response.ok:
            return response.url
        raise ExpandingErrorException
293245
def expand_action(data):
    
    # when given a string, assume user wants to index raw json
    if isinstance(data, string_types):
        return '{"index":{}}', data

    # make sure we don't alter the action
    data = data.copy()
    op_type = data.pop('_op_type', 'index')
    action = {op_type: {}}
    for key in ('_index', '_parent', '_percolate', '_routing', '_timestamp',
            '_ttl', '_type', '_version', '_version_type', '_id', '_retry_on_conflict'):
        if key in data:
            action[op_type][key] = data.pop(key)

    # no data payload for delete
    if op_type == 'delete':
        return action, None

    return action, data.get('_source', data)
862556
def _add_action(self, action):
        
        kwargs = self._get_method_params()

        kwargs['action'] = action

        self._bulk_actions.append(kwargs)
50520
public void addStackedSimons() {
		Split splitA = SimonManager.getStopwatch("Y.A").start();
		Split splitB = SimonManager.getStopwatch("Y.B").start();
		addStopwatchSplits(SimonManager.getStopwatch("Y.C"), 6);
		splitB.stop();
		Split splitD = SimonManager.getStopwatch("Y.D").start();
		randomWait(100, 250);
		randomWait(100, 250);
		splitD.stop();
		splitA.stop();
	}
606236
def add_action_to(cls, parser, action, subactions, level):
        
        p = parser.add_parser(action.name,
                              description=action.description,
                              argument_default=argparse.SUPPRESS)
        for arg in action.args:
            arg.add_argument_to(p)

        if subactions:
            subparsers = cls._add_subparsers_required(p,
                dest=settings.SUBASSISTANT_N_STRING.format(level),
                title=cls.subactions_str,
                description=cls.subactions_desc)
            for subact, subsubacts in sorted(subactions.items(), key=lambda x: x[0].name):
                cls.add_action_to(subparsers, subact, subsubacts, level + 1)
555608
private function hook_plugin_action_links() {
            $this->_logger->entrance();

            $this->_action_links_hooked = true;

            $this->_logger->log( 'Adding action links hooks.' );

            // Add action link to settings page.
            add_filter( 'plugin_action_links_' . $this->_plugin_basename, array(
                &$this,
                '_modify_plugin_action_links_hook'
            ), WP_FS__DEFAULT_PRIORITY, 2 );
            add_filter( 'network_admin_plugin_action_links_' . $this->_plugin_basename, array(
                &$this,
                '_modify_plugin_action_links_hook'
            ), WP_FS__DEFAULT_PRIORITY, 2 );
        }
692604
def __view_add_actions(self):
        

        self.__view.addAction(self.__container.engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|Search In Files|Replace All",
            slot=self.__view_replace_all_action__triggered))
        self.__view.addAction(self.__container.engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|Search In Files|Replace Selected",
            slot=self.__view_replace_selected_action__triggered))
        separator_action = QAction(self.__view)
        separator_action.setSeparator(True)
        self.__view.addAction(separator_action)
        self.__view.addAction(self.__container.engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|Search In Files|Save All",
            slot=self.__view_save_all_action__triggered))
        self.__view.addAction(self.__container.engine.actions_manager.register_action(
            "Actions|Umbra|Components|factory.script_editor|Search In Files|Save Selected",
            slot=self.__view_save_selected_action__triggered))
876600
def link_out(self, name, url):
        """"""
        self._messages.append(
            {
                "platform": "ACTIONS_ON_GOOGLE",
                "linkOutSuggestion": {"destinationName": name, "uri": url},
            }
        )

        return self