probe/core/src/main/client/app.js
/**
 * This only works if the type represents either a raw type or a parameterized
 * type with actual type params represented as simple names.
 *
 * @param type
 * @param htmlOutput
 * @param title
 * @param skipIcon
 * @returns {String}
 */
This only works if the type represents either a raw type or a parameterized
type with actual type params represented as simple names.


This only works if the type represents either a raw type or a parameterized type with actual type params represented as simple names .
function abbreviateType(type, htmlOutput, title, skipIcon) {
    var parts = type.split('.');
    var ret = '';
    var lastIdx = parts.length - 1;
    if (htmlOutput && title) {
        ret += ' <span title="' + type + '">';
    }
    for (var i = 0; i < parts.length; i++) {
        if (i === lastIdx) {
            ret += parts[i];
        } else {
            if (i === 0 && htmlOutput) {
                ret += '<span class="abbreviated">';
            }
            ret += parts[i].charAt(0);
            ret += '.';
            if (i === (lastIdx - 1) && htmlOutput) {
                ret += '</span>';
            }
        }
    }
    if (htmlOutput) {
        if (title) {
            ret += '</span>';
        }
        if (!skipIcon) {
            ret += ' <i class="fa fa-compress abbreviated"></i>';
        }
    }
    return ret;
}
function abbreviateType ( type , htmlOutput , title , skipIcon ) { var parts = type . split ( '.' ) ; var ret = '' ; var lastIdx = parts . length - 1 ; if ( htmlOutput && title ) { ret += ' <span title="' + type + '">' ; } for ( var i = 0 ; i < parts . length ; i ++ ) { if ( i === lastIdx ) { ret += parts [ i ] ; } else { if ( i === 0 && htmlOutput ) { ret += '<span class="abbreviated">' ; } ret += parts [ i ] . charAt ( 0 ) ; ret += '.' ; if ( i === ( lastIdx - 1 ) && htmlOutput ) { ret += '</span>' ; } } } if ( htmlOutput ) { if ( title ) { ret += '</span>' ; } if ( ! skipIcon ) { ret += ' <i class="fa fa-compress abbreviated"></i>' ; } } return ret ; }
This only works if the type represents either a raw type or a parameterized
 type with actual type params represented as simple names.
This only works if the type represents either a raw type or a parameterized type with actual type params represented as simple names .