/// class PD.Manage.ModuleTabStripContextMenuSegment
// using PD.Web.UI.Controls.ContextMenuSegment

PD.Manage.ModuleTabStripTabContextMenuSegment =
PD.Web.UI.Controls.ContextMenuSegment.extend({

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

    onRegisterItems: function (e) {

        var that = this;
        
        e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
            contextId: "global",
            commandId: "pd/modules/context-menu:module/open-in-new-window"
        }));

        e.addSeparator();

        e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
            contextId: "global",
            commandId: "pd/modules/context-menu:module/close"
        }));

        //e.registerItem(new PD.Web.UI.Controls.ContextMenuCommandItem({
        //    contextId: "global",
        //    commandId: "pd/modules/context-menu:module/close-all"
        //}));

    },

    onOpen: function (e) {

        PD.context.get_global().get_commands().setState({
            "pd/modules/context-menu": {
                module: e.context.attributes
            }
        });

    }

});