src/command/CommandManager.js
function registerInternal(id, commandFn) {
        if (_commands[id]) {
            console.log("Attempting to register an already-registered command: " + id);
            return null;
        }
        if (!id || !commandFn) {
            console.error("Attempting to register an internal command with a missing id, or command function: " + id);
            return null;
        }

        var command = new Command(null, id, commandFn);
        _commands[id] = command;

        exports.trigger("commandRegistered", command);

        return command;
    }
function registerInternal(id, commandFn) {
        if (_commands[id]) {
            console.log("Attempting to register an already-registered command: " + id);
            return null;
        }
        if (!id || !commandFn) {
            console.error("Attempting to register an internal command with a missing id, or command function: " + id);
            return null;
        }

        var command = new Command(null, id, commandFn);
        _commands[id] = command;

        exports.trigger("commandRegistered", command);

        return command;
    }
function registerInternal ( id , commandFn ) { if ( _commands [ id ] ) { console . log ( "Attempting to register an already-registered command: " + id ) ; return null ; } if ( ! id || ! commandFn ) { console . error ( "Attempting to register an internal command with a missing id, or command function: " + id ) ; return null ; } var command = new Command ( null , id , commandFn ) ; _commands [ id ] = command ; exports . trigger ( "commandRegistered" , command ) ; return command ; }
Registers a global internal only command.
@param {string} id - unique identifier for command.
Core commands in Brackets use a simple command title as an id, for example "app.abort_quit".
Extensions should use the following format: "author.myextension.mycommandname".
For example, "lschmitt.csswizard.format.css".
@param {function(...)} commandFn - the function to call when the command is executed. Any arguments passed to
execute() (after the id) are passed as arguments to the function. If the function is asynchronous,
it must return a jQuery promise that is resolved when the command completes. Otherwise, the
CommandManager will assume it is synchronous, and return a promise that is already resolved.
@return {?Command}
Registers a global internal only command .