src/extensibility/ExtensionManager.js
function downloadRegistry() {
        if (pendingDownloadRegistry) {
            return pendingDownloadRegistry.promise();
        }

        pendingDownloadRegistry = new $.Deferred();

        $.ajax({
            url: brackets.config.extension_registry,
            dataType: "json",
            cache: false
        })
            .done(function (data) {
                exports.hasDownloadedRegistry = true;
                Object.keys(data).forEach(function (id) {
                    if (!extensions[id]) {
                        extensions[id] = {};
                    }
                    extensions[id].registryInfo = data[id];
                    synchronizeEntry(id);
                });
                exports.trigger("registryDownload");
                pendingDownloadRegistry.resolve();
            })
            .fail(function () {
                pendingDownloadRegistry.reject();
            })
            .always(function () {
                // Make sure to clean up the pending registry so that new requests can be made.
                pendingDownloadRegistry = null;
            });

        return pendingDownloadRegistry.promise();
    }
function downloadRegistry() {
        if (pendingDownloadRegistry) {
            return pendingDownloadRegistry.promise();
        }

        pendingDownloadRegistry = new $.Deferred();

        $.ajax({
            url: brackets.config.extension_registry,
            dataType: "json",
            cache: false
        })
            .done(function (data) {
                exports.hasDownloadedRegistry = true;
                Object.keys(data).forEach(function (id) {
                    if (!extensions[id]) {
                        extensions[id] = {};
                    }
                    extensions[id].registryInfo = data[id];
                    synchronizeEntry(id);
                });
                exports.trigger("registryDownload");
                pendingDownloadRegistry.resolve();
            })
            .fail(function () {
                pendingDownloadRegistry.reject();
            })
            .always(function () {
                // Make sure to clean up the pending registry so that new requests can be made.
                pendingDownloadRegistry = null;
            });

        return pendingDownloadRegistry.promise();
    }
function downloadRegistry ( ) { if ( pendingDownloadRegistry ) { return pendingDownloadRegistry . promise ( ) ; } pendingDownloadRegistry = new $ . Deferred ( ) ; $ . ajax ( { url : brackets . config . extension_registry , dataType : "json" , cache : false } ) . done ( function ( data ) { exports . hasDownloadedRegistry = true ; Object . keys ( data ) . forEach ( function ( id ) { if ( ! extensions [ id ] ) { extensions [ id ] = { } ; } extensions [ id ] . registryInfo = data [ id ] ; synchronizeEntry ( id ) ; } ) ; exports . trigger ( "registryDownload" ) ; pendingDownloadRegistry . resolve ( ) ; } ) . fail ( function ( ) { pendingDownloadRegistry . reject ( ) ; } ) . always ( function ( ) { // Make sure to clean up the pending registry so that new requests can be made. pendingDownloadRegistry = null ; } ) ; return pendingDownloadRegistry . promise ( ) ; }
Downloads the registry of Brackets extensions and stores the information in our
extension info.

@return {$.Promise} a promise that's resolved with the registry JSON data
or rejected if the server can't be reached.
Downloads the registry of Brackets extensions and stores the information in our extension info .