"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const vscode = require("vscode");
const command_1 = require("../constants/command");
const ParserManager_1 = require("../model/ParserManager");
const setHoverMenuCommand = (ctx) => {
    ctx.subscriptions.push(vscode.commands.registerCommand(command_1.Commands.HoverMenu, (commandParams) => {
        const { filePath, command } = commandParams;
        const parser = ParserManager_1.default.getSingleInstance().caches[filePath];
        if (parser) {
            const listeners = parser.getService('hoverMenuCommand').listeners[command];
            listeners.forEach(listener => {
                listener(commandParams);
            });
        }
    }));
};
exports.default = setHoverMenuCommand;
//# sourceMappingURL=HoverMenu.js.map