{"size": 3412, "ext": "js", "max_stars_repo_path": "node_modules/@theia/workspace/lib/browser/workspace-frontend-module.js", "max_stars_repo_name": "amirsaad2015/dsl", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "node_modules/@theia/workspace/lib/browser/workspace-frontend-module.js", "max_issues_repo_name": "amirsaad2015/dsl", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "node_modules/@theia/workspace/lib/browser/workspace-frontend-module.js", "max_forks_repo_name": "amirsaad2015/dsl", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 52.4923076923, "max_line_length": 151, "alphanum_fraction": 0.7080890973}
"use strict";
/*
 * Copyright (C) 2017 TypeFox and others.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
 */
var __values = (this && this.__values) || function (o) {
    var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
    if (m) return m.call(o);
    return {
        next: function () {
            if (o && i >= o.length) o = void 0;
            return { value: o && o[i++], done: !o };
        }
    };
};
Object.defineProperty(exports, "__esModule", { value: true });
var inversify_1 = require("inversify");
var common_1 = require("@theia/core/lib/common");
var browser_1 = require("@theia/core/lib/browser");
var browser_2 = require("@theia/filesystem/lib/browser");
var storage_service_1 = require("@theia/core/lib/browser/storage-service");
var label_provider_1 = require("@theia/core/lib/browser/label-provider");
var common_2 = require("../common");
var workspace_frontend_contribution_1 = require("./workspace-frontend-contribution");
var workspace_service_1 = require("./workspace-service");
var workspace_commands_1 = require("./workspace-commands");
var workspace_storage_service_1 = require("./workspace-storage-service");
var workspace_uri_contribution_1 = require("./workspace-uri-contribution");
exports.default = new inversify_1.ContainerModule(function (bind, unbind, isBound, rebind) {
    bind(workspace_service_1.WorkspaceService).toSelf().inSingletonScope();
    bind(browser_1.FrontendApplicationContribution).toDynamicValue(function (ctx) { return ctx.container.get(workspace_service_1.WorkspaceService); });
    bind(common_2.WorkspaceServer).toDynamicValue(function (ctx) {
        var provider = ctx.container.get(browser_1.WebSocketConnectionProvider);
        return provider.createProxy(common_2.workspacePath);
    }).inSingletonScope();
    bind(workspace_frontend_contribution_1.WorkspaceFrontendContribution).toSelf().inSingletonScope();
    try {
        for (var _a = __values([common_1.CommandContribution, common_1.MenuContribution]), _b = _a.next(); !_b.done; _b = _a.next()) {
            var identifier = _b.value;
            bind(identifier).toDynamicValue(function (ctx) {
                return ctx.container.get(workspace_frontend_contribution_1.WorkspaceFrontendContribution);
            }).inSingletonScope();
        }
    }
    catch (e_1_1) { e_1 = { error: e_1_1 }; }
    finally {
        try {
            if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
        }
        finally { if (e_1) throw e_1.error; }
    }
    bind(browser_2.FileDialogFactory).toFactory(function (ctx) {
        return function (props) {
            return browser_2.createFileDialog(ctx.container, props);
        };
    });
    bind(common_1.CommandContribution).to(workspace_commands_1.WorkspaceCommandContribution).inSingletonScope();
    bind(common_1.MenuContribution).to(workspace_commands_1.FileMenuContribution).inSingletonScope();
    rebind(storage_service_1.StorageService).to(workspace_storage_service_1.WorkspaceStorageService).inSingletonScope();
    bind(label_provider_1.LabelProviderContribution).to(workspace_uri_contribution_1.WorkspaceUriLabelProviderContribution).inSingletonScope();
    var e_1, _c;
});
//# sourceMappingURL=workspace-frontend-module.js.map