/// class PD.Manage.Modules.ExpressionsContextMenu
// using PD.Web.UI.Controls.ContextMenuSegment

PD.Manage.Modules.ExpressionsContextMenu =
PD.Web.UI.Controls.ContextMenuSegment.extend({

    //===================================
    // EVENT HANDLERS
    //===================================

    onRegisterItems: function (e) {

        e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
            commandId: "pd/expressions:expression/edit-dialog"
        }));

        e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
            commandId: "pd/expressions:expression/delete"
        }));

    },

    onOpen: function (e) {

        PD.context.get_default().get_commands().setState({
            "pd/expressions/context-menu": {
                expressions: this.get_context()["selections"]
            }
        });

    }

});