bundles/org.eclipse.orion.client.ui/web/gcli/gcli/commands/help.js
function getManTemplateData(command, context) {
  var manTemplateData = {
    l10n: l10n.propertyLookup,
    command: command,

    onclick: function(ev) {
      util.updateCommand(ev.currentTarget, context);
    },

    ondblclick: function(ev) {
      util.executeCommand(ev.currentTarget, context);
    },

    describe: function(item) {
      return item.manual || item.description;
    },

    getTypeDescription: function(param) {
      var input = '';
      if (param.defaultValue === undefined) {
        input = l10n.lookup('helpManRequired');
      }
      else if (param.defaultValue === null) {
        input = l10n.lookup('helpManOptional');
      }
      else {
        input = param.defaultValue;
      }
      return '(' + param.type.name + ', ' + input + ')';
    }
  };

  Object.defineProperty(manTemplateData, 'subcommands', {
    get: function() {
      var matching = canon.getCommands().filter(function(subcommand) {
        return subcommand.name.indexOf(command.name) === 0 &&
                subcommand.name !== command.name;
      });
      matching.sort(function(c1, c2) {
        return c1.name.localeCompare(c2.name);
      });
      return matching;
    },
    enumerable: true
  });

  return manTemplateData;
}
function getManTemplateData(command, context) {
  var manTemplateData = {
    l10n: l10n.propertyLookup,
    command: command,

    onclick: function(ev) {
      util.updateCommand(ev.currentTarget, context);
    },

    ondblclick: function(ev) {
      util.executeCommand(ev.currentTarget, context);
    },

    describe: function(item) {
      return item.manual || item.description;
    },

    getTypeDescription: function(param) {
      var input = '';
      if (param.defaultValue === undefined) {
        input = l10n.lookup('helpManRequired');
      }
      else if (param.defaultValue === null) {
        input = l10n.lookup('helpManOptional');
      }
      else {
        input = param.defaultValue;
      }
      return '(' + param.type.name + ', ' + input + ')';
    }
  };

  Object.defineProperty(manTemplateData, 'subcommands', {
    get: function() {
      var matching = canon.getCommands().filter(function(subcommand) {
        return subcommand.name.indexOf(command.name) === 0 &&
                subcommand.name !== command.name;
      });
      matching.sort(function(c1, c2) {
        return c1.name.localeCompare(c2.name);
      });
      return matching;
    },
    enumerable: true
  });

  return manTemplateData;
}
function getManTemplateData ( command , context ) { var manTemplateData = { l10n : l10n . propertyLookup , command : command , onclick : function ( ev ) { util . updateCommand ( ev . currentTarget , context ) ; } , ondblclick : function ( ev ) { util . executeCommand ( ev . currentTarget , context ) ; } , describe : function ( item ) { return item . manual || item . description ; } , getTypeDescription : function ( param ) { var input = '' ; if ( param . defaultValue === undefined ) { input = l10n . lookup ( 'helpManRequired' ) ; } else if ( param . defaultValue === null ) { input = l10n . lookup ( 'helpManOptional' ) ; } else { input = param . defaultValue ; } return '(' + param . type . name + ', ' + input + ')' ; } } ; Object . defineProperty ( manTemplateData , 'subcommands' , { get : function ( ) { var matching = canon . getCommands ( ) . filter ( function ( subcommand ) { return subcommand . name . indexOf ( command . name ) === 0 && subcommand . name !== command . name ; } ) ; matching . sort ( function ( c1 , c2 ) { return c1 . name . localeCompare ( c2 . name ) ; } ) ; return matching ; } , enumerable : true } ) ; return manTemplateData ; }
Create a block of data suitable to be passed to the help_man.html template
Create a block of data suitable to be passed to the help_man . html template