/// class PD.Manage.Modules.ObjectModel.EntityTypeOpenCommand

PD.Manage.Modules.ObjectModel.EntityTypeOpenCommand =
PD.Commands.Command.extend({

    //===================================
    // PUBLIC METHODS
    //===================================

    setDefaults: function () {

        this.props("id", "entity-type/open");
        this.props("enabled", true);
        this.props("icon", PD.Path.to16x16("FOLDER_OPEN.PNG"));
        this.props("label", "Open");
        this.props("tooltip", "Open the Explorer Model<br/>for the selected Entity Type.");

        this.state("entityTypeId", null);

    },

    setState: function (state) {
        this._super(state);
        this.props("enabled", this.state("entityTypeId") != null)
    },

    execute: function (e) {
        this._super(e);
        window.location.hash = "/module/entity-type/" + this.state("entityTypeId");
    }

});