bundles/org.eclipse.orion.client.ui/web/orion/widgets/projects/RunBar.js
function(command, evnt) {
			var buttonNode = evnt.target;
			var id = buttonNode.id;
			var isEnabled = this._isEnabled(buttonNode);
			var disabled = isEnabled ? "" : ".disabled"; //$NON-NLS-1$ //$NON-NLS-0$
			
			mMetrics.logEvent("ui", "invoke", METRICS_LABEL_PREFIX + "." + id +".clicked" + disabled, evnt.which); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
			
			if (isEnabled) {
				if (typeof command === "function") { //$NON-NLS-0$
					command.call(this, buttonNode);
				} else {
					this._commandRegistry.runCommand(command, this._selectedLaunchConfiguration, this, null, null, buttonNode); //$NON-NLS-0$
				}
			}
		}
function(command, evnt) {
			var buttonNode = evnt.target;
			var id = buttonNode.id;
			var isEnabled = this._isEnabled(buttonNode);
			var disabled = isEnabled ? "" : ".disabled"; //$NON-NLS-1$ //$NON-NLS-0$
			
			mMetrics.logEvent("ui", "invoke", METRICS_LABEL_PREFIX + "." + id +".clicked" + disabled, evnt.which); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
			
			if (isEnabled) {
				if (typeof command === "function") { //$NON-NLS-0$
					command.call(this, buttonNode);
				} else {
					this._commandRegistry.runCommand(command, this._selectedLaunchConfiguration, this, null, null, buttonNode); //$NON-NLS-0$
				}
			}
		}
function ( command , evnt ) { var buttonNode = evnt . target ; var id = buttonNode . id ; var isEnabled = this . _isEnabled ( buttonNode ) ; var disabled = isEnabled ? "" : ".disabled" ; //$NON-NLS-1$ //$NON-NLS-0$ mMetrics . logEvent ( "ui" , "invoke" , METRICS_LABEL_PREFIX + "." + id + ".clicked" + disabled , evnt . which ) ; //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$ if ( isEnabled ) { if ( typeof command === "function" ) { //$NON-NLS-0$ command . call ( this , buttonNode ) ; } else { this . _commandRegistry . runCommand ( command , this . _selectedLaunchConfiguration , this , null , null , buttonNode ) ; //$NON-NLS-0$ } } }
Implements a generic button listener which executes the specified
command when it is invoked and collects metrics

@param[in] {String | Function} command A String containing the id of the command to run or a Function to call
@param[in] {Event} event The event which triggered the listener
Implements a generic button listener which executes the specified command when it is invoked and collects metrics