public void addListener(Listener aListener)
    {
        if (aListener == null) return;

        if (hexEditControl == null) {
            if (listOfStatusChangedListeners == null)
                listOfStatusChangedListeners = new ArrayList<>();
            listOfStatusChangedListeners.add(aListener);
        } else {
            hexEditControl.addListener(SWT.Modify, aListener);
        }
    }
Add a listener to changes of the 'dirty', 'insert/overwrite', 'selection' and 'canUndo/canRedo'
status

@param aListener the listener to be notified of changes
plugins/org.jkiss.dbeaver.ui.editors.hex/src/org/jkiss/dbeaver/ui/editors/binary/HexManager.java