implementing Modules.Events.addDocumentListener, Modules.Events.addDocumentContextListener, Modules.Events.removeDocumentListener