nl_tokens: Create a list of the hints associated with this parameter assignment . Generally there will be only one hint generated because we re currently only displaying one hint at a time ordering by distance from cursor and severity . Since distance from cursor will be the same for all hints from this assignment all but the most severe will ever be used . It might make sense with more experience to alter this to function to be getHint ()
pl_tokens: function ( ) { // Allow the parameter to provide documentation if ( this . param . getCustomHint && this . value && this . arg ) { var hint = this . param . getCustomHint ( this . value , this . arg ) ; if ( hint ) { return hint ; } } // If there is no argument, use the cursor position var message = '<strong>' + this . param . name + '</strong>: ' ; if ( this . param . description ) { // TODO: This should be a short description - do we need to trim? message += this . param . description . trim ( ) ; // Ensure the help text ends with '. ' if ( message . charAt ( <mask> . length - 1 ) !== '.' ) { message += '.' ; } if ( message . charAt ( message . length - 1 ) !== ' ' ) { message += ' ' ; } } var status = Status . VALID ; var start = this . arg ? this . arg . start : Argument . AT_CURSOR ; var end = this . arg ? this . arg . end : Argument . AT_CURSOR ; var predictions ; // Non-valid conversions will have useful information to pass on if ( this . conversion ) { status = this . conversion . status ; if ( this . conversion . message ) { message += this . conversion . message ; } predictions = this . conversion . predictions ; } // Hint if the param is required, but not provided var argProvided = this . arg && this . arg . text !== '' ; var dataProvided = this . value !== undefined || argProvided ; if ( this . param . defaultValue === undefined && ! dataProvided ) { status = Status . INVALID ; message += '<strong>Required<\strong>' ; } return new Hint ( status , message , start , end , predictions ) ; }