"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BreakpointsContributionPoint = void 0;
const tslib_1 = require("tslib");
const di_1 = require("@opensumi/di");
const debug_configuration_manager_1 = require("@opensumi/ide-debug/lib/browser/debug-configuration-manager");
const common_1 = require("../../../common");
let BreakpointsContributionPoint = class BreakpointsContributionPoint extends common_1.VSCodeContributePoint {
    contribute() {
        for (const contrib of this.contributesMap) {
            const { contributes } = contrib;
            contributes.forEach((item) => {
                this.debugConfigurationManager.addSupportBreakpoints(item.language);
            });
        }
    }
    unregister(items) {
        items.forEach((item) => {
            this.debugConfigurationManager.removeSupportBreakpoints(item.language);
        });
    }
    dispose() {
        for (const contrib of this.contributesMap) {
            const { contributes } = contrib;
            this.unregister(contributes);
        }
    }
};
exports.BreakpointsContributionPoint = BreakpointsContributionPoint;
tslib_1.__decorate([
    (0, di_1.Autowired)(debug_configuration_manager_1.DebugConfigurationManager),
    tslib_1.__metadata("design:type", debug_configuration_manager_1.DebugConfigurationManager)
], BreakpointsContributionPoint.prototype, "debugConfigurationManager", void 0);
exports.BreakpointsContributionPoint = BreakpointsContributionPoint = tslib_1.__decorate([
    (0, di_1.Injectable)(),
    (0, common_1.Contributes)('breakpoints'),
    (0, common_1.LifeCycle)(3 /* LifeCyclePhase.Starting */)
], BreakpointsContributionPoint);
//# sourceMappingURL=breakpoints.js.map