You can modify adecomm/_adeevnt.p to intercept or filter various events that occur in an ADE session. The Procedure Editor calls adecomm/_adeevnt.p when certain processing events occur. Generally, these events are file oriented (for example, OPEN, SAVE, and CLOSE), but they can be more general (for example, STARTUP and SHUTDOWN).
The source code for this file is in DLC/src/adecomm/_adeevent.p. Look at this file for the latest information on ADE events.