function handleEditorChange(session, document, previousDocument) {
            if (addFilesPromise === null) {
                doEditorChange(session, document, previousDocument);
            } else {
                addFilesPromise.done(function () {
                    doEditorChange(session, document, previousDocument);
                });
            }
        }
Called each time a new editor becomes active.

@param {Session} session - the active hinting session (TODO: currently unused by doEditorChange())
@param {!Document} document - the document of the editor that has changed
@param {?Document} previousDocument - the document of the editor is changing from