bundles/org.eclipse.orion.client.ui/web/orion/commandRegistry.js
function(commandId, item, handler, parameters, userData, parent) {
			var self = this;
			if (item) {
				var command = this._commandList[commandId];
				var enabled = command && (command.visibleWhen ? command.visibleWhen(item) : true);
				if (enabled && command.callback) {
					var commandInvocation = new Commands.CommandInvocation(handler, item, userData, command, self);
					commandInvocation.domParent = parent;
					return self._invoke(commandInvocation, parameters);
				}
			} else {
				//TODO should we be keeping invocation context for commands without bindings? 
				var binding = this._urlBindings[commandId];
				if (binding && binding.command) {
					if (binding.command.callback) {
						return self._invoke(binding.invocation, parameters);
					}
				}
			}
		}
function(commandId, item, handler, parameters, userData, parent) {
			var self = this;
			if (item) {
				var command = this._commandList[commandId];
				var enabled = command && (command.visibleWhen ? command.visibleWhen(item) : true);
				if (enabled && command.callback) {
					var commandInvocation = new Commands.CommandInvocation(handler, item, userData, command, self);
					commandInvocation.domParent = parent;
					return self._invoke(commandInvocation, parameters);
				}
			} else {
				//TODO should we be keeping invocation context for commands without bindings? 
				var binding = this._urlBindings[commandId];
				if (binding && binding.command) {
					if (binding.command.callback) {
						return self._invoke(binding.invocation, parameters);
					}
				}
			}
		}
function ( commandId , item , handler , parameters , userData , parent ) { var self = this ; if ( item ) { var command = this . _commandList [ commandId ] ; var enabled = command && ( command . visibleWhen ? command . visibleWhen ( item ) : true ) ; if ( enabled && command . callback ) { var commandInvocation = new Commands . CommandInvocation ( handler , item , userData , command , self ) ; commandInvocation . domParent = parent ; return self . _invoke ( commandInvocation , parameters ) ; } } else { //TODO should we be keeping invocation context for commands without bindings?  var binding = this . _urlBindings [ commandId ] ; if ( binding && binding . command ) { if ( binding . command . callback ) { return self . _invoke ( binding . invocation , parameters ) ; } } } }
Run the command with the specified commandId.

@param {String} commandId the id of the command to run.
@param {Object} item the item on which the command should run.
@param {Object} handler the handler for the command.
@param {orion.commands.ParametersDescription} [parameters] Parameters used on this invocation. Optional.
@param {Object} [userData] Optional user data that should be attached to generated command callbacks.
@param {DOMElement} [parent] Optional parent for the parameter collector.

Note:  The current implementation will only run the command if a URL binding has been
specified, or if an item to run the command against has been specified.
Run the command with the specified commandId .