# Source: editor/EditingContextChangedEvent.js

    /**
     * {@link XMLEditorEvent} sent whenever the editing context changes,
     * for example because the selection changes, because some data has been copied
     * to the clipboard, etc.
     */
    export class EditingContextChangedEvent extends XMLEditorEvent {
        constructor(xmlEditor, data) {
            super(xmlEditor, data, "editingContextChanged");
        }

        /**
         * Get the <code>commandStates</code> property of this event:
         * an array containing the states of all the "contextual commands"
         * registered with the {@link XMLEditor}.
         * <p>This array contains pairs:
         * <ul>
         * <li><code>enabled</code>, a boolean.
         * <li><code>detail</code>, an object (generally <code>null</code>)
         * which depends on the command.
         * </li>
         *
         * @type {}
         * @see XMLEditor#getCommandState
         */
        get commandStates() {
            // Return null rather than undefined.
            return !this._commandStates? null : this._commandStates;
        }

        /**
         * Get the <code>nodePathItems</code> property of this event:
         * an array containing information about
         * the full path of currently selected node.
         * <p>Returned information always starts with information
         * about the root element of the document.
         * <p>Returned array is <em>empty</em> if there is no
         * currently selected node. Otherwise it contains triplets:
         * <ul>
         * <li>Node UID.
         * <li>Node tag.
         * <li>Information about the node. A possibly empty list of strings
         * separated by newlines.
         * <p>First, an empty string or some flags separated by commas:
         * <code>"sel"</code>: impicitely or explicitely selected,
         * <code>"ro"</code>: read-only.
         * <p>Possibly followed by attribute name/value pairs.
         * </li>
         * </ul>
         *
         * @type {}
         */
        get nodePathItems() {
            // Return null rather than undefined.
            return !this._nodePathItems? null : this._nodePathItems;
        }

        /**
         * Get the <code>clipboardUpdate</code> property of this event:
         * an object if the clipboard has been updated on the server side;
         * <code>null</code> otherwise.
         * <p>clipboardUpdate object is <em>empty</em> if the clipboard is empty.
         * Otherwise it contains:
         * <ul>
         * <li><code>label</code>: a short text describing the content.
         * <li><code>inclusion</code>: <code>true</code> if the content
         * consists in included nodes.
         * <li><code>source</code>: a text representation of the content.
         * </ul>
         *
         * @type {object}
         */
        get clipboardUpdate() {
            // Return null rather than undefined.
            return !this._clipboardUpdate? null : this._clipboardUpdate;
        }
    }