@Override
        protected boolean isVisible() {
            switch (type) {
                case undo:
                case redo:
                case cut:
                case paste:
                case delete:
                case cutAll:
                case replaceAll:
                case deleteAll:
                    return getTextComponent().isEditable();
                default:
                    return true;
            }
        }